Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: desktop-options.js

Issue 29584714: Issue 5874 - Sync strings with the agencies translations (Closed)
Patch Set: Rebased Created Oct. 23, 2017, 1:03 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « desktop-options.html ('k') | locale/en_US/common.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 ]); 369 ]);
370 collections.whitelist = new Collection([ 370 collections.whitelist = new Collection([
371 { 371 {
372 id: "whitelisting-table", 372 id: "whitelisting-table",
373 emptyTexts: ["options_whitelist_empty_1", "options_whitelist_empty_2"] 373 emptyTexts: ["options_whitelist_empty_1", "options_whitelist_empty_2"]
374 } 374 }
375 ]); 375 ]);
376 collections.filterLists = new Collection([ 376 collections.filterLists = new Collection([
377 { 377 {
378 id: "all-filter-lists-table", 378 id: "all-filter-lists-table",
379 emptyTexts: ["options_filterList_empty"],
379 useOriginalTitle: true 380 useOriginalTitle: true
380 } 381 }
381 ]); 382 ]);
382 383
383 function addSubscription(subscription) 384 function addSubscription(subscription)
384 { 385 {
385 let {disabled} = subscription; 386 let {disabled} = subscription;
386 let collection = null; 387 let collection = null;
387 if (subscription.recommended) 388 if (subscription.recommended)
388 { 389 {
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 document.body.addEventListener("click", onClick, false); 897 document.body.addEventListener("click", onClick, false);
897 document.body.addEventListener("keyup", onKeyUp, false); 898 document.body.addEventListener("keyup", onKeyUp, false);
898 let exampleValue = getMessage("options_whitelist_placeholder_example", 899 let exampleValue = getMessage("options_whitelist_placeholder_example",
899 ["www.example.com"]); 900 ["www.example.com"]);
900 E("whitelisting-textbox").setAttribute("placeholder", exampleValue); 901 E("whitelisting-textbox").setAttribute("placeholder", exampleValue);
901 E("whitelisting-textbox").addEventListener("keyup", (e) => 902 E("whitelisting-textbox").addEventListener("keyup", (e) =>
902 { 903 {
903 E("whitelisting-add-button").disabled = !e.target.value; 904 E("whitelisting-add-button").disabled = !e.target.value;
904 }, false); 905 }, false);
905 906
907 // General tab
906 getDocLink("contribute", (link) => 908 getDocLink("contribute", (link) =>
907 { 909 {
908 E("contribute").href = link; 910 E("contribute").href = link;
909 }); 911 });
910 getDocLink("acceptable_ads_criteria", (link) => 912 getDocLink("acceptable_ads_criteria", (link) =>
911 { 913 {
912 setLinks("enable-acceptable-ads-description", link); 914 setLinks("enable-acceptable-ads-description", link);
913 }); 915 });
914 getDocLink("privacy_friendly_ads", (link) => 916 getDocLink("privacy_friendly_ads", (link) =>
915 { 917 {
916 E("enable-acceptable-ads-privacy-description").href = link; 918 E("enable-acceptable-ads-privacy-description").href = link;
917 }); 919 });
918 getDocLink("adblock_plus_{browser}_dnt", url => 920 getDocLink("adblock_plus_{browser}_dnt", url =>
919 { 921 {
920 setLinks("dnt", url); 922 setLinks("dnt", url);
921 }); 923 });
922 924
925 // Whitelisted tab
926 getDocLink("whitelist", (link) =>
927 {
928 setLinks("whitelist-description", link);
929 });
930
923 // Advanced tab 931 // Advanced tab
924 let customize = document.querySelectorAll("#customize li[data-pref]"); 932 let customize = document.querySelectorAll("#customize li[data-pref]");
925 customize = Array.prototype.map.call(customize, (checkbox) => 933 customize = Array.prototype.map.call(customize, (checkbox) =>
926 { 934 {
927 return checkbox.getAttribute("data-pref"); 935 return checkbox.getAttribute("data-pref");
928 }); 936 });
929 for (let key of customize) 937 for (let key of customize)
930 { 938 {
931 getPref(key, (value) => 939 getPref(key, (value) =>
932 { 940 {
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 }); 1425 });
1418 browser.runtime.sendMessage({ 1426 browser.runtime.sendMessage({
1419 type: "subscriptions.listen", 1427 type: "subscriptions.listen",
1420 filter: ["added", "disabled", "homepage", "lastDownload", "removed", 1428 filter: ["added", "disabled", "homepage", "lastDownload", "removed",
1421 "title", "downloadStatus", "downloading"] 1429 "title", "downloadStatus", "downloading"]
1422 }); 1430 });
1423 1431
1424 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); 1432 window.addEventListener("DOMContentLoaded", onDOMLoaded, false);
1425 window.addEventListener("hashchange", onHashChange, false); 1433 window.addEventListener("hashchange", onHashChange, false);
1426 } 1434 }
OLDNEW
« no previous file with comments | « desktop-options.html ('k') | locale/en_US/common.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld