Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
384 } | 384 } |
385 | 385 |
386 return frames[0]; | 386 return frames[0]; |
387 } | 387 } |
388 } | 388 } |
389 }; | 389 }; |
390 | 390 |
391 return ext.onMessage._dispatch(message, sender, sendResponse).indexOf(true) != -1; | 391 return ext.onMessage._dispatch(message, sender, sendResponse).indexOf(true) != -1; |
392 }); | 392 }); |
393 | 393 |
394 // We have to register any listener for the onConnect event. Otherwise | 394 // We have to ensure there is at least one listener for the onConnect event. |
395 // you can't connect any ports. However, we need to connect from the | 395 // Otherwise we can't connect a port later, which we need to do in order to |
396 // content script, in order to detect extension reload/disable/uninstall. | 396 // detect when the extension is reloaded, disabled or uninstalled. |
397 chrome.runtime.onConnect.addListener(function() {}); | 397 chrome.runtime.onConnect.addListener(function() {}); |
kzar
2015/01/26 16:05:22
The comment doesn't read quite right, how about th
Sebastian Noack
2015/01/26 16:13:56
Doesn't read that much differently for me. But I g
| |
398 | 398 |
399 | 399 |
400 /* Storage */ | 400 /* Storage */ |
401 | 401 |
402 ext.storage = localStorage; | 402 ext.storage = localStorage; |
403 | 403 |
404 | 404 |
405 /* Options */ | 405 /* Options */ |
406 | 406 |
407 ext.showOptions = function(callback) | 407 ext.showOptions = function(callback) |
(...skipping 28 matching lines...) Expand all Loading... | |
436 callback(new Page(tab)); | 436 callback(new Page(tab)); |
437 } | 437 } |
438 else | 438 else |
439 { | 439 { |
440 ext.pages.open(optionsUrl, callback); | 440 ext.pages.open(optionsUrl, callback); |
441 } | 441 } |
442 }); | 442 }); |
443 }); | 443 }); |
444 }; | 444 }; |
445 })(); | 445 })(); |
LEFT | RIGHT |