diff --git a/app/setup/components/Views/AdditionalFeaturesView.jsx b/app/setup/components/Views/AdditionalFeaturesView.jsx index 01bff90f7..913f06e40 100644 --- a/app/setup/components/Views/AdditionalFeaturesView.jsx +++ b/app/setup/components/Views/AdditionalFeaturesView.jsx @@ -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); + } } /** diff --git a/app/setup/reducers/additionalFeatures.js b/app/setup/reducers/additionalFeatures.js index aa5dd3e33..08a669898 100644 --- a/app/setup/reducers/additionalFeatures.js +++ b/app/setup/reducers/additionalFeatures.js @@ -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, diff --git a/src/background.js b/src/background.js index 2382bd142..3afe75e81 100644 --- a/src/background.js +++ b/src/background.js @@ -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.