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

Fix for GH-936 - wrong behavior on Setup page for Ghostery in Cliqz browser #34

Closed
wants to merge 13 commits into from
@@ -45,7 +45,9 @@ class AdditionalFeaturesView extends Component {
* @param {Object} event The event created by the onChange property
*/
_handleAntiTrack = (event) => {
this.props.actions.updateAntiTrack(event.target.checked);
if (!IS_CLIQZ) {
this.props.actions.updateAntiTrack(event.target.checked);
}
}

/**
@@ -61,7 +63,9 @@ class AdditionalFeaturesView extends Component {
* @param {Object} event The event created by the onChange property
*/
_handleAdBlock = (event) => {
this.props.actions.updateAdBlock(event.target.checked);
if (!IS_CLIQZ) {
this.props.actions.updateAdBlock(event.target.checked);
}
}

/**
@@ -40,6 +40,9 @@ const initialState = {
export default (state = initialState, action) => {
switch (action.type) {
case UPDATE_ANTITRACK: {
if (IS_CLIQZ) {
return state;
}
msg.sendMessage('updateAntiTrack', action.data);
return Object.assign({}, state, {
antiTrack: action.data,
@@ -52,6 +55,9 @@ export default (state = initialState, action) => {
});
}
case UPDATE_ADBLOCK: {
if (IS_CLIQZ) {
return state;
}
msg.sendMessage('updateAdBlock', action.data);
return Object.assign({}, state, {
adBlock: action.data,
@@ -45,6 +45,7 @@ import { allowAllwaysC2P } from './utils/click2play';
import * as common from './utils/common';
import * as utils from './utils/utils';


// class instantiation
const button = new Button();
const events = new Events();
@@ -92,7 +93,6 @@ function setCliqzModuleEnabled(module, enabled) {
log('MODULE IS ALREADY IN CORRECT STATE', module, enabled);
return Promise.resolve(CORRECT_STATE);
}

/**
* Check and fetch (if needed) a new tracker library every 12 hours
* @memberOf Background
@@ -1015,6 +1015,7 @@ offers.on('enabled', () => {
setCliqzModuleEnabled(messageCenter, true);
});
});

/**
* Set listener for 'enabled' event for Offers module.
* It registers message handler for messages with the offers.
ProTip! Use n and p to navigate between commits in a pull request.