| 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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 break; | 120 break; |
| 121 | 121 |
| 122 // Select subscription in its list and restore focus after that | 122 // Select subscription in its list and restore focus after that |
| 123 let oldFocus = document.commandDispatcher.focusedElement; | 123 let oldFocus = document.commandDispatcher.focusedElement; |
| 124 E("tabs").selectedIndex = (subscription instanceof SpecialSubscription
? 1 : 0); | 124 E("tabs").selectedIndex = (subscription instanceof SpecialSubscription
? 1 : 0); |
| 125 list.ensureElementIsVisible(node); | 125 list.ensureElementIsVisible(node); |
| 126 list.selectItem(node); | 126 list.selectItem(node); |
| 127 if (oldFocus) | 127 if (oldFocus) |
| 128 { | 128 { |
| 129 oldFocus.focus(); | 129 oldFocus.focus(); |
| 130 Utils.runAsync(oldFocus.focus, oldFocus); | 130 Utils.runAsync(() => oldFocus.focus()); |
| 131 } | 131 } |
| 132 | 132 |
| 133 Utils.runAsync(findText, null, text, direction, direction == 1 ? -1 :
subscription.filters.length); | 133 Utils.runAsync(() => findText(text, direction, direction == 1 ? -1 :
subscription.filters.length)); |
| 134 return result; | 134 return result; |
| 135 } | 135 } |
| 136 } | 136 } |
| 137 } | 137 } |
| 138 | 138 |
| 139 return Ci.nsITypeAheadFind.FIND_NOTFOUND; | 139 return Ci.nsITypeAheadFind.FIND_NOTFOUND; |
| 140 } | 140 } |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 /** | 143 /** |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 { | 230 { |
| 231 E("filtersTree").boxObject.scrollByPages(num); | 231 E("filtersTree").boxObject.scrollByPages(num); |
| 232 }, | 232 }, |
| 233 } | 233 } |
| 234 }; | 234 }; |
| 235 | 235 |
| 236 window.addEventListener("load", function() | 236 window.addEventListener("load", function() |
| 237 { | 237 { |
| 238 FilterSearch.init(); | 238 FilterSearch.init(); |
| 239 }, false); | 239 }, false); |
| OLD | NEW |