Skip to content

Commit 2177080

Browse files
use one link tracking protections msg for all cases, match current style of popup messaging
1 parent 42c349d commit 2177080

File tree

4 files changed

+8
-18
lines changed

4 files changed

+8
-18
lines changed

src/_locales/en_US/messages.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -424,13 +424,9 @@
424424
}
425425
},
426426
"popup_info_firstparty_protections": {
427-
"message": "and is enforcing <a href='https://www.eff.org/deeplinks/2018/05/privacy-badger-rolls-out-new-ways-fight-facebook-tracking'>link tracking protections</a>.",
427+
"message": "Protection from <a href='https://www.eff.org/deeplinks/2018/05/privacy-badger-rolls-out-new-ways-fight-facebook-tracking'>link tracking</a> is enforced on this site",
428428
"description": "message shown on a site where first party outgoing link tracking protections are enabled"
429429
},
430-
"popup_info_firstparty_protections_no_trackers": {
431-
"message": "<a href='https://www.eff.org/deeplinks/2018/05/privacy-badger-rolls-out-new-ways-fight-facebook-tracking'>Link tracking protections</a> are enforced.",
432-
"description": "message shown on a site where first party outgoing link tracking protections are enabled, but there are no third party trackers detected."
433-
},
434430
"popup_blocked": {
435431
"message": "There are no third party resources on this page. Hooray for privacy!",
436432
"description": "Text shown in the popup when showing non-tracking domains is enabled, and there are no third-party domains on the page."

src/js/popup.js

+5-10
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ function init() {
169169
$overlay.toggleClass('active');
170170
}
171171

172+
// show firstparty link tracking protection if we scrub links on this tab host
173+
if (POPUP_DATA.tabHost == 'www.facebook.com' || POPUP_DATA.tabHost == 'www.google.com') {
174+
$("#instructions_firstparty_protections").show();
175+
}
176+
172177
$("#error").on("click", function() {
173178
$overlay.toggleClass('active');
174179
});
@@ -599,23 +604,13 @@ function refreshPopup() {
599604

600605
// show "no trackers" message
601606
$("#instructions-no-trackers").show();
602-
603-
// show first party protections message if link tracker cleaning is enabled on this tabHost
604-
if (POPUP_DATA.tabHost == 'www.facebook.com' || POPUP_DATA.tabHost == 'www.google.com') {
605-
$("#instructions_firstparty_protections_no_trackers").show();
606-
}
607607
} else {
608608
$('#instructions-many-trackers').html(chrome.i18n.getMessage(
609609
"popup_instructions", [
610610
POPUP_DATA.trackerCount,
611611
"<a target='_blank' title='" + _.escape(chrome.i18n.getMessage("what_is_a_tracker")) + "' class='tooltip' href='https://privacybadger.org/#What-is-a-third-party-tracker'>"
612612
]
613613
)).find(".tooltip").tooltipster();
614-
615-
// show first party protections message if link tracker cleaning is enabled on this tabHost
616-
if (POPUP_DATA.tabHost == 'www.facebook.com' || POPUP_DATA.tabHost == 'www.google.com') {
617-
$("#instructions_firstparty_protections").show();
618-
}
619614
}
620615

621616
function renderDomains() {

src/skin/popup.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ font-size: 16px;
297297
#pbInstructions :not(#options_domain_list_trackers):not(#options_domain_list_no_trackers) a:hover {
298298
color: #ec9329
299299
}
300-
#instructions-no-trackers, #special-browser-page, #disabled-site-message, #instructions_firstparty_protections_no_trackers {
300+
#instructions-no-trackers, #special-browser-page, #disabled-site-message, #instructions_firstparty_protections {
301301
text-align: center;
302302
margin: 45px 0;
303303
padding: 0;
@@ -306,7 +306,7 @@ font-size: 16px;
306306
text-align: center;
307307
margin: 10px 0;
308308
}
309-
#instructions-many-trackers, #instructions-no-trackers, #no-third-parties, #instructions_firstparty_protections_no_trackers {
309+
#instructions-many-trackers, #instructions-no-trackers, #no-third-parties, #instructions_firstparty_protections {
310310
display: block;
311311
}
312312
#no-third-parties {

src/skin/popup.html

-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ <h2 id="title-name"><span class="i18n_name"></span></h2>
128128
<span id="instructions-no-trackers" style="display:none">
129129
<span class="i18n_popup_instructions_no_trackers" data-i18n_contents_placeholders="<a target='_blank' title='i18n_what_is_a_tracker' class='tooltip' href='https://privacybadger.org/#What-is-a-third-party-tracker'>"></span>
130130
<span id="no-third-parties" class="i18n_popup_blocked" style="display:none"></span>
131-
<span id="instructions_firstparty_protections_no_trackers" class="i18n_popup_info_firstparty_protections_no_trackers" style="display:none"></span>
132131
</span>
133132
<span id="instructions_firstparty_protections" class="i18n_popup_info_firstparty_protections" style="display:none"></span>
134133
</p>

0 commit comments

Comments
 (0)