Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-1566 - Smart blocking should check for Click2Play #388

Merged
merged 9 commits into from Jun 11, 2019

Add c2p entry check to shouldBlock for smart block policy.

  • Loading branch information
jsignanini committed Jun 11, 2019
commit 80d7c46e103feb5f82bd774baeef70597e9c192c
@@ -122,6 +122,7 @@ class PolicySmartBlock {
* 3. Page is neither whitelisted or blacklisted
* 4. Tracker is not site-specific unblocked
* 5. Tracker is not site-specific blocked
* 6. Tracker does not have entry in Click2Play
*
* @param {number} tabId tab id
* @param {string | boolean} appId tracker id
@@ -136,7 +137,8 @@ class PolicySmartBlock {
!globals.SESSION.paused_blocking &&
!this.policy.getSitePolicy(tabUrl) &&
((appId && (!conf.site_specific_unblocks.hasOwnProperty(tabHost) || !conf.site_specific_unblocks[tabHost].includes(+appId))) || appId === false) &&
((appId && (!conf.site_specific_blocks.hasOwnProperty(tabHost) || !conf.site_specific_blocks[tabHost].includes(+appId))) || appId === false)
((appId && (!conf.site_specific_blocks.hasOwnProperty(tabHost) || !conf.site_specific_blocks[tabHost].includes(+appId))) || appId === false) &&
!c2pDb.db.apps.hasOwnProperty(appId)
);
}

ProTip! Use n and p to navigate between commits in a pull request.