mirror of https://github.com/gorhill/uBlock.git
this fixes #1121: `allow` rule will no longer affect cosmetic filtering.
the per-site cosmetic filtering switch must be used instead.
This commit is contained in:
parent
7952143a1f
commit
b63f55b7af
|
@ -447,23 +447,16 @@ PageStore.prototype.getNetFilteringSwitch = function() {
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
PageStore.prototype.getSpecificCosmeticFilteringSwitch = function() {
|
PageStore.prototype.getSpecificCosmeticFilteringSwitch = function() {
|
||||||
var tabContext = µb.tabContextManager.mustLookup(this.tabId);
|
var tabContext = µb.tabContextManager.lookup(this.tabId);
|
||||||
|
return tabContext !== null &&
|
||||||
if ( µb.hnSwitches.evaluateZ('no-cosmetic-filtering', tabContext.rootHostname) ) {
|
µb.hnSwitches.evaluateZ('no-cosmetic-filtering', tabContext.rootHostname) !== true;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return µb.userSettings.advancedUserEnabled === false ||
|
|
||||||
µb.sessionFirewall.mustAllowCellZY(tabContext.rootHostname, tabContext.rootHostname, '*') === false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
PageStore.prototype.getGenericCosmeticFilteringSwitch = function() {
|
PageStore.prototype.getGenericCosmeticFilteringSwitch = function() {
|
||||||
if ( this.skipCosmeticFiltering ) {
|
return this.skipCosmeticFiltering !== true &&
|
||||||
return false;
|
this.getSpecificCosmeticFilteringSwitch();
|
||||||
}
|
|
||||||
return this.getSpecificCosmeticFilteringSwitch();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue