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-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 this._keys.splice(index, 1); | 73 this._keys.splice(index, 1); |
74 this._values.splice(index, 1); | 74 this._values.splice(index, 1); |
75 } | 75 } |
76 } | 76 } |
77 }; | 77 }; |
78 | 78 |
79 window.ext.PageMap = PageMap; | 79 window.ext.PageMap = PageMap; |
80 | 80 |
81 window.ext.showOptions = function(callback) | 81 window.ext.showOptions = function(callback) |
82 { | 82 { |
83 if (top.location.href.indexOf("new-options.html") == -1) | 83 if (!/\/(?:mobile|new)-options\.html/.test(top.location.href)) |
84 window.open("new-options.html", "_blank"); | 84 window.open("new-options.html", "_blank"); |
85 | 85 |
86 if (callback) | 86 if (callback) |
87 callback(); | 87 callback(); |
88 }; | 88 }; |
89 | 89 |
90 window.ext.devtools = { | 90 window.ext.devtools = { |
91 onCreated: { | 91 onCreated: { |
92 addListener(listener) | 92 addListener(listener) |
93 { | 93 { |
94 window.addEventListener("message", (event) => | 94 window.addEventListener("message", (event) => |
95 { | 95 { |
96 if (event.data.type == "devtools") | 96 if (event.data.type == "devtools") |
97 listener(new ext.Page(event.source)); | 97 listener(new ext.Page(event.source)); |
98 }); | 98 }); |
99 } | 99 } |
100 } | 100 } |
101 }; | 101 }; |
102 }()); | 102 }()); |
OLD | NEW |