OLD | NEW |
1 /* | 1 /* |
2 * This file is part of the URL Fixer, | 2 * This file is part of the URL Fixer, |
3 * Copyright (C) 2006-2012 Eyeo GmbH | 3 * Copyright (C) 2006-2012 Eyeo GmbH |
4 * | 4 * |
5 * URL Fixer is free software: you can redistribute it and/or modify | 5 * URL Fixer 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 * URL Fixer is distributed in the hope that it will be useful, | 9 * URL Fixer 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 12 matching lines...) Expand all Loading... |
23 | 23 |
24 function initCheckboxes() | 24 function initCheckboxes() |
25 { | 25 { |
26 E("domainOptIn").checked = Prefs.domainOptIn; | 26 E("domainOptIn").checked = Prefs.domainOptIn; |
27 } | 27 } |
28 | 28 |
29 function onItemSelected(list) | 29 function onItemSelected(list) |
30 { | 30 { |
31 let button = E(list.getAttribute("_removeButton")); | 31 let button = E(list.getAttribute("_removeButton")); |
32 let items = list.selectedItems; | 32 let items = list.selectedItems; |
33 button.disabled = (items.length == 0 || (items.length == 1 && !items[0].value)
) | 33 button.disabled = (items.length == 0 || (items.length == 1 && !items[0].value)
); |
34 } | 34 } |
35 | 35 |
36 function onFindChange() | 36 function onFindChange() |
37 { | 37 { |
38 let find = E("find"); | 38 let find = E("find"); |
39 let button = E("add-button"); | 39 let button = E("add-button"); |
40 button.disabled = !find.value; | 40 button.disabled = !find.value; |
41 } | 41 } |
42 | 42 |
43 function onPrefChange(name) | 43 function onPrefChange(name) |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 for (let i = items.length - 1; i >= 0; i--) | 167 for (let i = items.length - 1; i >= 0; i--) |
168 { | 168 { |
169 let searchString = items[i].getAttribute("value"); | 169 let searchString = items[i].getAttribute("value"); |
170 delete Prefs[pref][searchString]; | 170 delete Prefs[pref][searchString]; |
171 | 171 |
172 if (pref == "whitelist") | 172 if (pref == "whitelist") |
173 onWhitelistEntryRemoved(searchString); | 173 onWhitelistEntryRemoved(searchString); |
174 } | 174 } |
175 Prefs[pref] = JSON.parse(JSON.stringify(Prefs[pref])); | 175 Prefs[pref] = JSON.parse(JSON.stringify(Prefs[pref])); |
176 } | 176 } |
OLD | NEW |