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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 updateFromURL(modules.info); | 390 updateFromURL(modules.info); |
391 | 391 |
392 modules.subscriptionInit = { | 392 modules.subscriptionInit = { |
393 reinitialized: params.filterlistsReinitialized | 393 reinitialized: params.filterlistsReinitialized |
394 }; | 394 }; |
395 | 395 |
396 modules.messaging = { | 396 modules.messaging = { |
397 port: new EventEmitter() | 397 port: new EventEmitter() |
398 }; | 398 }; |
399 | 399 |
| 400 modules.options = { |
| 401 showOptions(callback) |
| 402 { |
| 403 if (!/\/(mobile-)?options\.html\b/.test(top.location.href)) |
| 404 window.open("options.html", "_blank"); |
| 405 |
| 406 if (callback) |
| 407 callback(); |
| 408 } |
| 409 }; |
| 410 |
400 window.addEventListener("message", (event) => | 411 window.addEventListener("message", (event) => |
401 { | 412 { |
402 if (event.data.type != "message") | 413 if (event.data.type != "message") |
403 return; | 414 return; |
404 let message = event.data.payload; | 415 let message = event.data.payload; |
405 let {messageId} = event.data; | 416 let {messageId} = event.data; |
406 let sender = { | 417 let sender = { |
407 page: new ext.Page(event.source) | 418 page: new ext.Page(event.source) |
408 }; | 419 }; |
409 | 420 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 }, | 601 }, |
591 filter: { | 602 filter: { |
592 text: "||example.com/some-annoying-popup$popup", | 603 text: "||example.com/some-annoying-popup$popup", |
593 whitelisted: false, | 604 whitelisted: false, |
594 userDefined: true, | 605 userDefined: true, |
595 subscription: null | 606 subscription: null |
596 } | 607 } |
597 }); | 608 }); |
598 }); | 609 }); |
599 }()); | 610 }()); |
OLD | NEW |