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-2283/Ad-blocker-off-by-default-in-Dawn #693

Closed
wants to merge 10 commits into from
@@ -78,9 +78,9 @@ class OnboardingViewContainer extends Component {
origin: ONBOARDING
});
actions.setBlockingPolicy({ blockingPolicy: BLOCKING_POLICY_RECOMMENDED });
actions.setAntiTracking({ enable_anti_tracking: true }); // covered
actions.setAdBlock({ enable_ad_block: true }); // covered
actions.setSmartBlocking({ enable_smart_block: true }); // covered
actions.setAntiTracking({ enable_anti_tracking: true });
actions.setAdBlock({ enable_ad_block: false }); // GH-2283
actions.setSmartBlocking({ enable_smart_block: true });
}
}

@@ -156,7 +156,7 @@ OnboardingViewContainer.defaultProps = {
setup: {
blockingPolicy: BLOCKING_POLICY_RECOMMENDED,
enable_anti_tracking: true,
enable_ad_block: true,
enable_ad_block: false,
enable_smart_block: true,
},
};
@@ -94,4 +94,4 @@
"web_accessible_resources": [
"app/images/*"
]
}
}
@@ -1538,6 +1538,8 @@ function initializeGhosteryModules() {
conf.enable_anti_tracking = !antitracking.isDisabled;
conf.enable_human_web = !humanweb.isDisabled;

cliqz.prefs.set('modules.adblocker.enabled', conf.enable_ad_block); // GH-2283

if (!antitracking.isDisabled) {
antitracking.action('setConfigOption', 'networkFetchEnabled', !!conf.enable_autoupdate);
}
@@ -22,6 +22,7 @@ export const HPN_MODULE = IS_ANDROID ? 'hpn-lite' : 'hpnv2';
// Override the default prefs based on the platform
CLIQZ.config.default_prefs = {
...CLIQZ.config.default_prefs,
'modules.adblocker.enabled': false, // GH-2283
// the following are enabled by default on non-android platforms
'modules.human-web.enabled': !IS_ANDROID,
'modules.hpnv2.enabled': !IS_ANDROID,
@@ -97,6 +97,7 @@ class ConfData {
(async() => {
await globals.BROWSER_INFO_READY;
_initProperty('enable_metrics', BROWSER_INFO.name === 'ghostery_desktop');
_initProperty('enable_ad_block', !IS_CLIQZ && BROWSER_INFO.name !== 'ghostery_desktop'); // GH-2283
})();

// simple props
@@ -111,7 +112,6 @@ class ConfData {
_initProperty('cliqz_import_state', 0);
_initProperty('cmp_version', 0);
_initProperty('current_theme', 'default');
_initProperty('enable_ad_block', !IS_CLIQZ);
_initProperty('enable_anti_tracking', !IS_CLIQZ);
_initProperty('enable_autoupdate', true);
_initProperty('enable_click2play', true);
@@ -346,6 +346,11 @@ class EventHandlers {
}

const app_id = bugDb.db.bugs[bug_id].aid;

if (app_id === 67) { // GH-2283
return { cancel: false };
}

const cat_id = bugDb.db.apps[app_id].cat;
const incognito = tabInfo.getTabInfo(tab_id, 'incognito');
const tab_host = tabInfo.getTabInfo(tab_id, 'host');
ProTip! Use n and p to navigate between commits in a pull request.