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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 this._resultListeners.push(listener); | 199 this._resultListeners.push(listener); |
200 }, | 200 }, |
201 | 201 |
202 removeResultListener: function(listener) | 202 removeResultListener: function(listener) |
203 { | 203 { |
204 let index = this._resultListeners.indexOf(listener); | 204 let index = this._resultListeners.indexOf(listener); |
205 if (index !== -1) | 205 if (index !== -1) |
206 this._resultListeners.splice(index, 1); | 206 this._resultListeners.splice(index, 1); |
207 }, | 207 }, |
208 | 208 |
| 209 getInitialSelection: function() |
| 210 { |
| 211 for (let listener of this._resultListeners) |
| 212 listener.onCurrentSelection(null, true); |
| 213 }, |
| 214 |
209 // Irrelevant for us | 215 // Irrelevant for us |
210 requestMatchesCount: function(searchString, matchLimit, linksOnly) {}, | 216 requestMatchesCount: function(searchString, matchLimit, linksOnly) {}, |
211 highlight: function(highlight, word) {}, | 217 highlight: function(highlight, word) {}, |
212 enableSelection: function() {}, | 218 enableSelection: function() {}, |
213 removeSelection: function() {}, | 219 removeSelection: function() {}, |
214 focusContent: function() {}, | 220 focusContent: function() {}, |
215 keyPress: function() {} | 221 keyPress: function() {} |
216 }, | 222 }, |
217 | 223 |
218 currentURI: Utils.makeURI("http://example.com/"), | 224 currentURI: Utils.makeURI("http://example.com/"), |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 }, | 271 }, |
266 | 272 |
267 sendAsyncMessage: function() {} | 273 sendAsyncMessage: function() {} |
268 } | 274 } |
269 }; | 275 }; |
270 | 276 |
271 window.addEventListener("load", function() | 277 window.addEventListener("load", function() |
272 { | 278 { |
273 FilterSearch.init(); | 279 FilterSearch.init(); |
274 }, false); | 280 }, false); |
OLD | NEW |