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

Enable whitelisting of Unknown Trackers from Ad Block module #503

Merged
merged 4 commits into from Mar 3, 2020
Merged
Changes from 1 commit
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Next

enable whitlisting of Unknown ads

  • Loading branch information
christophertino committed Feb 27, 2020
commit 25979f9d627f9a09ce8e7ec9874a0ab4532ee90b
@@ -342,7 +342,7 @@ class Tracker extends React.Component {
this.clickTrackerRestrict,
this.clickTrackerStatus,
)}
{isUnknown && tracker.type === 'antiTracking' && renderUnknownTrackerButtons(
{isUnknown && renderUnknownTrackerButtons(
this.handleCliqzTrackerWhitelist,
tracker.whitelisted,
tracker.siteRestricted,
@@ -77,7 +77,7 @@ export const renderUnknownTrackerButtons = (
</span>

{/* USE INLINE SVG FOR ANTI-TRACKING SHIELD TO CHANGE COLORS WITH CSS */}
<span className="t-tooltip-up-left" data-g-tooltip={t('panel_tracker_scrub_tooltip')}>
<span className="t-tooltip-up-left" data-g-tooltip={type === 'antiTracking' ? t('panel_tracker_scrub_tooltip') : t('panel_tracker_restrict_tooltip')}>
<svg className="cliqz-tracker-scrub" onClick={handleCliqzTrackerWhitelist} width="20px" height="20px" viewBox="0 0 20 20">
<g transform="translate(1 1)" fill="none" fillRule="evenodd">
<path className="border" stroke="#00AEF0" d="M-.5-.5h18.3v18.217H-.5z" />
@@ -1193,7 +1193,6 @@ function isWhitelisted(state) {
// state.ghosteryWhitelisted is sometimes undefined so force to bool
return Boolean(globals.SESSION.paused_blocking || events.policy.getSitePolicy(state.tabUrl, state.url) === 2 || state.ghosteryWhitelisted);
}

/**
* Set listener for 'enabled' event for Antitracking module which replaces
* Antitracking isWhitelisted method with Ghostery's isWhitelisted method.
@@ -1213,7 +1212,9 @@ antitracking.on('enabled', () => {
* @memberOf Background
*/
adblocker.on('enabled', () => {
adblocker.isReady().then(() => adblocker.action('addWhiteListCheck', url => isWhitelisted({ tabUrl: url })));
adblocker.isReady().then(() => {
adblocker.action('addWhiteListCheck', isWhitelisted);
});
});

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