aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgorhill <rhill@raymondhill.net>2015-02-06 06:49:48 -0500
committergorhill <rhill@raymondhill.net>2015-02-06 06:49:48 -0500
commit932f14bd6e8730c544929c6a2cde24b141430b07 (patch)
tree51c74453caa02c4dc7809000591dc1cc93f78a00 /src
parent36f0b4dec936655bc5dd64ec0367ffe7f92df804 (diff)
downloaduBlock-932f14bd6e8730c544929c6a2cde24b141430b07.zip
uBlock-932f14bd6e8730c544929c6a2cde24b141430b07.tar.gz
uBlock-932f14bd6e8730c544929c6a2cde24b141430b07.tar.bz2
code review re. #695
Diffstat (limited to 'src')
-rw-r--r--src/js/storage.js16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/js/storage.js b/src/js/storage.js
index eb666ed..ff6c267 100644
--- a/src/js/storage.js
+++ b/src/js/storage.js
@@ -307,25 +307,19 @@
// Load all filter lists which are not disabled
var location;
- var filterlistLoadingCount = 0;
- while ( filterlistCount !== 0 ) {
- location = locations.pop()
- if ( !location ) {
- break;
- }
+ while ( location = locations.pop() ) {
// rhill 2013-12-09:
// Ignore list if disabled
// https://github.com/gorhill/httpswitchboard/issues/78
- if ( lists[location].off === false ) {
- filterlistLoadingCount += 1;
- µb.assets.get(location, mergeBlacklist);
+ if ( lists[location].off ) {
+ filterlistCount -= 1;
continue;
}
- filterlistCount -= 1;
+ µb.assets.get(location, mergeBlacklist);
}
// https://github.com/gorhill/uBlock/issues/695
// It may happen not a single filter list is selected
- if ( filterlistLoadingCount === 0 ) {
+ if ( filterlistCount === 0 ) {
loadBlacklistsEnd();
}
};