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
Prev

update prefs to disable ad-blocker

  • Loading branch information
christophertino committed Feb 23, 2021
commit 31cf928cde97d0f5daa29c1da3de769669ff4109
@@ -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,
@@ -34,12 +35,4 @@ if (IS_ANDROID) {
CLIQZ.config.settings.HW_CHANNEL = 'android';
}

// GH-2283
if (globals.JUST_INSTALLED) {
CLIQZ.config.default_prefs = {
...CLIQZ.config.default_prefs,
'modules.adblocker.enabled': false,
};
}

export default new (CLIQZ.App)({ debug: globals.DEBUG });
@@ -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);
@@ -347,7 +347,7 @@ class EventHandlers {

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

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

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