Left: | ||
Right: |
OLD | NEW |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 } | 87 } |
88 $(loadOptions); | 88 $(loadOptions); |
89 | 89 |
90 function onMessage(msg) | 90 function onMessage(msg) |
91 { | 91 { |
92 switch (msg.type) | 92 switch (msg.type) |
93 { | 93 { |
94 case "add-subscription": | 94 case "add-subscription": |
95 startSubscriptionSelection(msg.title, msg.url); | 95 startSubscriptionSelection(msg.title, msg.url); |
96 break; | 96 break; |
97 default: | |
Sebastian Noack
2014/12/19 17:57:53
While changing this code, mind changing the verbos
Wladimir Palant
2014/12/19 19:38:42
Done.
| |
98 console.log("got unexpected message: " + msg.type); | |
99 } | 97 } |
100 }; | 98 }; |
101 | 99 |
102 // Reloads the displayed subscriptions and filters | 100 // Reloads the displayed subscriptions and filters |
103 function reloadFilters() | 101 function reloadFilters() |
104 { | 102 { |
105 // Load user filter URLs | 103 // Load user filter URLs |
106 var container = document.getElementById("filterLists"); | 104 var container = document.getElementById("filterLists"); |
107 while (container.lastChild) | 105 while (container.lastChild) |
108 container.removeChild(container.lastChild); | 106 container.removeChild(container.lastChild); |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
647 links[i].href = arguments[i + 1]; | 645 links[i].href = arguments[i + 1]; |
648 links[i].setAttribute("target", "_blank"); | 646 links[i].setAttribute("target", "_blank"); |
649 } | 647 } |
650 else if (typeof arguments[i + 1] == "function") | 648 else if (typeof arguments[i + 1] == "function") |
651 { | 649 { |
652 links[i].href = "javascript:void(0);"; | 650 links[i].href = "javascript:void(0);"; |
653 links[i].addEventListener("click", arguments[i + 1], false); | 651 links[i].addEventListener("click", arguments[i + 1], false); |
654 } | 652 } |
655 } | 653 } |
656 } | 654 } |
OLD | NEW |