| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |