-
-
Notifications
You must be signed in to change notification settings - Fork 391
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
Add option to disable sending the Do Not Track (DNT) signal #2089
Changes from 2 commits
779ad89
80c173b
7568b0d
d6dcca8
440a12e
02cb283
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,10 @@ | |
"message": "Currently Privacy Badger only checks if third parties are using cookies, HTML5 local storage, or canvas fingerprinting to track your browsing. Some of these domains may be using tracking methods that Privacy Badger can't detect.", | ||
"description": "" | ||
}, | ||
"options_enable_dnt_checkbox": { | ||
"message": "Enable sending DNT header", | ||
"description": "" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add a description to provide translators with context? You could describe where in Badger's UI this label is located. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
}, | ||
"options_dnt_policy_setting": { | ||
"message": "Check if sites comply with EFF's Do Not Track policy", | ||
"description": "Checkbox label on the general settings page" | ||
|
@@ -439,4 +443,4 @@ | |
"message": "Oops. Something went wrong.", | ||
"description": "" | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -459,6 +459,7 @@ Badger.prototype = { | |
showCounter: true, | ||
showTrackingDomains: false, | ||
socialWidgetReplacementEnabled: true, | ||
DNTEnabled: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should use a more descriptive name like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please insert the new setting in alphabetic order. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
}, | ||
|
||
/** | ||
|
@@ -612,6 +613,13 @@ Badger.prototype = { | |
return this.getSettings().getItem("socialWidgetReplacementEnabled"); | ||
}, | ||
|
||
/** | ||
* Check if social widget replacement functionality is enabled | ||
*/ | ||
isDNTEnabled: function() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
return this.getSettings().getItem("DNTEnabled"); | ||
}, | ||
|
||
isCheckingDNTPolicyEnabled: function() { | ||
return this.getSettings().getItem("checkForDNTPolicy"); | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,6 +114,8 @@ function loadOptions() { | |
$("#show_counter_checkbox").prop("checked", badger.showCounter()); | ||
$("#replace_social_widgets_checkbox").on("click", updateSocialWidgetReplacement); | ||
$("#replace_social_widgets_checkbox").prop("checked", badger.isSocialWidgetReplacementEnabled()); | ||
$("#enable_dnt_checkbox").on("click", updateDNTCheckboxClicked); | ||
$("#enable_dnt_checkbox").prop("checked", badger.isDNTEnabled()); | ||
$("#check_dnt_policy_checkbox").on("click", updateCheckingDNTPolicy); | ||
$("#check_dnt_policy_checkbox").prop("checked", badger.isCheckingDNTPolicyEnabled()); | ||
|
||
|
@@ -316,6 +318,23 @@ function updateSocialWidgetReplacement() { | |
}); | ||
} | ||
|
||
/** | ||
* Update DNT checkbox clicked | ||
*/ | ||
function updateDNTCheckboxClicked() { | ||
const enabled = $("#enable_dnt_checkbox").prop("checked"); | ||
|
||
chrome.runtime.sendMessage({ | ||
type: "updateSettings", | ||
data: { | ||
DNTEnabled: enabled | ||
} | ||
}); | ||
|
||
$("#check_dnt_policy_checkbox").prop("checked", enabled).prop("disabled", enabled); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When the options page first loads, "Check if sites comply with EFF's Do Not Track policy" is not grayed out, but toggling the send DNT signal checkbox grays it out. This is inconsistent. If we are going to force-enable DNT checking when DNT sending is enabled, we should make it visually clear that DNT checking is a sub-option of DNT sending. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, I've fixed this inconsistency. The grey-out state of the DNT checking is persisted now on initial load. And disabling sending the DNT header automatically disables the DNT checking. |
||
updateCheckingDNTPolicy(); | ||
} | ||
|
||
function updateCheckingDNTPolicy() { | ||
const enabled = $("#check_dnt_policy_checkbox").prop("checked"); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,6 +150,12 @@ <h1><span class="i18n_options_title"></span></h1> | |
<span class="i18n_options_social_widgets_checkbox"></span> | ||
</label> | ||
</div> | ||
<div class="checkbox"> | ||
<label> | ||
<input type="checkbox" id="enable_dnt_checkbox"> | ||
<span class="i18n_options_enable_dnt_checkbox"></span> | ||
</label> | ||
</div> | ||
<div class="checkbox"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you indicate that checking DNT policies is a sub-setting of sending the DNT signal? Perhaps by indenting the DNT policies checkbox a bit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, indented this option in, flush with the footer text. |
||
<label> | ||
<input type="checkbox" id="check_dnt_policy_checkbox"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's rename "DNT header" to "Do Not Track signal", and link it to https://www.eff.org/issues/do-not-track.
"Do Not Track" instead of "DNT" because we shouldn't assume familiarity with the abbreviation.
"Signal" instead of "header" because we also assert DNT in JavaScript (#1861).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done