| 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-2013 Eyeo GmbH | 3 * Copyright (C) 2006-2013 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 // Cleans up when the options window is closed | 127 // Cleans up when the options window is closed |
| 128 function unloadOptions() | 128 function unloadOptions() |
| 129 { | 129 { |
| 130 FilterNotifier.removeListener(onFilterChange); | 130 FilterNotifier.removeListener(onFilterChange); |
| 131 } | 131 } |
| 132 | 132 |
| 133 function initCheckbox(id) | 133 function initCheckbox(id) |
| 134 { | 134 { |
| 135 var checkbox = document.getElementById(id); | 135 var checkbox = document.getElementById(id); |
| 136 checkbox.checked = typeof localStorage[id] == "undefined" ? true : localStorag
e[id] == "true"; | 136 checkbox.checked = Prefs[id]; |
| 137 checkbox.addEventListener("click", function() | 137 checkbox.addEventListener("click", function() |
| 138 { | 138 { |
| 139 localStorage[id] = checkbox.checked; | 139 Prefs[id] = checkbox.checked; |
| 140 }, false); | 140 }, false); |
| 141 } | 141 } |
| 142 | 142 |
| 143 function showUserFilters() | 143 function showUserFilters() |
| 144 { | 144 { |
| 145 var filters = []; | 145 var filters = []; |
| 146 var exceptions = []; | 146 var exceptions = []; |
| 147 for (var i = 0; i < FilterStorage.subscriptions.length; i++) | 147 for (var i = 0; i < FilterStorage.subscriptions.length; i++) |
| 148 { | 148 { |
| 149 var subscription = FilterStorage.subscriptions[i]; | 149 var subscription = FilterStorage.subscriptions[i]; |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 links[i].href = arguments[i + 1]; | 646 links[i].href = arguments[i + 1]; |
| 647 links[i].setAttribute("target", "_blank"); | 647 links[i].setAttribute("target", "_blank"); |
| 648 } | 648 } |
| 649 else if (typeof arguments[i + 1] == "function") | 649 else if (typeof arguments[i + 1] == "function") |
| 650 { | 650 { |
| 651 links[i].href = "javascript:void(0);"; | 651 links[i].href = "javascript:void(0);"; |
| 652 links[i].addEventListener("click", arguments[i + 1], false); | 652 links[i].addEventListener("click", arguments[i + 1], false); |
| 653 } | 653 } |
| 654 } | 654 } |
| 655 } | 655 } |
| OLD | NEW |