mirror of https://github.com/gorhill/uBlock.git
code review: no need to reload dynamic filters when reloading filter lists
This commit is contained in:
parent
ed7cb573a0
commit
0400352b4f
|
@ -1272,6 +1272,7 @@ var FilterContainer = function() {
|
||||||
this.buckets = new Array(4);
|
this.buckets = new Array(4);
|
||||||
this.blockedAnyPartyHostnames = new µb.LiquidDict();
|
this.blockedAnyPartyHostnames = new µb.LiquidDict();
|
||||||
this.blocked3rdPartyHostnames = new µb.LiquidDict();
|
this.blocked3rdPartyHostnames = new µb.LiquidDict();
|
||||||
|
this.dynamicFilters = {};
|
||||||
this.filterParser = new FilterParser();
|
this.filterParser = new FilterParser();
|
||||||
this.reset();
|
this.reset();
|
||||||
};
|
};
|
||||||
|
@ -1292,7 +1293,6 @@ FilterContainer.prototype.reset = function() {
|
||||||
this.duplicates = Object.create(null);
|
this.duplicates = Object.create(null);
|
||||||
this.blockedAnyPartyHostnames.reset();
|
this.blockedAnyPartyHostnames.reset();
|
||||||
this.blocked3rdPartyHostnames.reset();
|
this.blocked3rdPartyHostnames.reset();
|
||||||
this.dynamicFilters = {};
|
|
||||||
this.filterParser.reset();
|
this.filterParser.reset();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -667,10 +667,10 @@
|
||||||
// User settings are in memory
|
// User settings are in memory
|
||||||
var onUserSettingsReady = function(settings) {
|
var onUserSettingsReady = function(settings) {
|
||||||
µb.assets.autoUpdate = settings.autoUpdate;
|
µb.assets.autoUpdate = settings.autoUpdate;
|
||||||
µb.contextMenu.toggle(settings.contextMenuEnabled);
|
|
||||||
µb.netFilteringEngine.dynamicFiltersFromSelfie(settings.dynamicFilteringSelfie);
|
µb.netFilteringEngine.dynamicFiltersFromSelfie(settings.dynamicFilteringSelfie);
|
||||||
µb.fromSelfie(onSelfieReady);
|
µb.fromSelfie(onSelfieReady);
|
||||||
µb.mirrors.toggle(settings.experimentalEnabled);
|
µb.mirrors.toggle(settings.experimentalEnabled);
|
||||||
|
µb.contextMenu.toggle(settings.contextMenuEnabled);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loadUserSettings(onUserSettingsReady);
|
this.loadUserSettings(onUserSettingsReady);
|
||||||
|
|
Loading…
Reference in New Issue