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: Created Oct. 20, 2017, 9:10 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
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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 document.body.addEventListener("click", onClick, false); 877 document.body.addEventListener("click", onClick, false);
877 document.body.addEventListener("keyup", onKeyUp, false); 878 document.body.addEventListener("keyup", onKeyUp, false);
878 let exampleValue = getMessage("options_whitelist_placeholder_example", 879 let exampleValue = getMessage("options_whitelist_placeholder_example",
879 ["www.example.com"]); 880 ["www.example.com"]);
880 E("whitelisting-textbox").setAttribute("placeholder", exampleValue); 881 E("whitelisting-textbox").setAttribute("placeholder", exampleValue);
881 E("whitelisting-textbox").addEventListener("keyup", (e) => 882 E("whitelisting-textbox").addEventListener("keyup", (e) =>
882 { 883 {
883 E("whitelisting-add-button").disabled = !e.target.value; 884 E("whitelisting-add-button").disabled = !e.target.value;
884 }, false); 885 }, false);
885 886
887 // General tab
886 getDocLink("contribute", (link) => 888 getDocLink("contribute", (link) =>
887 { 889 {
888 E("contribute").href = link; 890 E("contribute").href = link;
889 }); 891 });
890 getDocLink("acceptable_ads_criteria", (link) => 892 getDocLink("acceptable_ads_criteria", (link) =>
891 { 893 {
892 setLinks("enable-aa-description", link); 894 setLinks("enable-aa-description", link);
893 }); 895 });
894 getDocLink("adblock_plus_{browser}_dnt", url => 896 getDocLink("adblock_plus_{browser}_dnt", url =>
895 { 897 {
896 setLinks("dnt", url); 898 setLinks("dnt", url);
897 }); 899 });
898 900
901 // Whitelisted tab
902 getDocLink("whitelist", (link) =>
903 {
904 setLinks("whitelist-description", link);
905 });
906
899 // Advanced tab 907 // Advanced tab
900 let customize = document.querySelectorAll("#customize li[data-pref]"); 908 let customize = document.querySelectorAll("#customize li[data-pref]");
901 customize = Array.prototype.map.call(customize, (checkbox) => 909 customize = Array.prototype.map.call(customize, (checkbox) =>
902 { 910 {
903 return checkbox.getAttribute("data-pref"); 911 return checkbox.getAttribute("data-pref");
904 }); 912 });
905 for (let key of customize) 913 for (let key of customize)
906 { 914 {
907 getPref(key, (value) => 915 getPref(key, (value) =>
908 { 916 {
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 }); 1388 });
1381 browser.runtime.sendMessage({ 1389 browser.runtime.sendMessage({
1382 type: "subscriptions.listen", 1390 type: "subscriptions.listen",
1383 filter: ["added", "disabled", "homepage", "lastDownload", "removed", 1391 filter: ["added", "disabled", "homepage", "lastDownload", "removed",
1384 "title", "downloadStatus", "downloading"] 1392 "title", "downloadStatus", "downloading"]
1385 }); 1393 });
1386 1394
1387 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); 1395 window.addEventListener("DOMContentLoaded", onDOMLoaded, false);
1388 window.addEventListener("hashchange", onHashChange, false); 1396 window.addEventListener("hashchange", onHashChange, false);
1389 } 1397 }
OLDNEW
« desktop-options.html ('K') | « desktop-options.html ('k') | locale/en_US/common.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld