From 43512277c60bebbd830ea0c151196435bc5ff0cd Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 31 Jul 2017 17:03:09 -0400 Subject: [PATCH] fix #2835 --- src/js/cosmetic-filtering.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/js/cosmetic-filtering.js b/src/js/cosmetic-filtering.js index 1f918cd0d..de26c5bc5 100644 --- a/src/js/cosmetic-filtering.js +++ b/src/js/cosmetic-filtering.js @@ -1529,6 +1529,15 @@ FilterContainer.prototype.retrieveUserScripts = function(domain, hostname) { return; } + // https://github.com/gorhill/uBlock/issues/2835 + // Do not inject scriptlets if the site is under an `allow` rule. + if ( + µb.userSettings.advancedUserEnabled === true && + µb.sessionFirewall.evaluateCellZY(hostname, hostname, '*') === 2 + ) { + return; + } + // Exceptions should be rare, so we check for exception only if there are // scriptlets returned. var exceptions = [], j, token;