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-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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
185 }).then(response => | 185 }).then(response => |
186 { | 186 { |
187 // Sometimes sendMessage incorrectly reports a success on Firefox, so | 187 // Sometimes sendMessage incorrectly reports a success on Firefox, so |
188 // we must check the response too. | 188 // we must check the response too. |
189 if (!response) | 189 if (!response) |
190 throw new Error(); | 190 throw new Error(); |
191 | 191 |
192 // Sometimes Firefox doesn't draw the window's contents initially, so we | 192 // Sometimes Firefox doesn't draw the window's contents initially, so we |
193 // resize the window slightly as a workaround. | 193 // resize the window slightly as a workaround. |
194 // https://issues.adblockplus.org/ticket/6493 | 194 // https://issues.adblockplus.org/ticket/6493 |
195 browser.windows.update(window.id, {width: 422}); | 195 if (info.application == "firefox") |
kzar
2018/10/04 15:30:37
For some reason one pixel larger wasn't enough to
Sebastian Noack
2018/10/04 18:38:55
Would it work if we remove the width from the brow
kzar
2018/10/08 14:50:13
Well, I tried that but initially the width of the
| |
196 browser.windows.update(window.id, {width: window.width + 2}); | |
196 }).catch(e => | 197 }).catch(e => |
197 { | 198 { |
198 // Firefox sometimes sets the status for a window to "complete" before | 199 // Firefox sometimes sets the status for a window to "complete" before |
199 // it is ready to receive messages[1]. As a workaround we'll try again a | 200 // it is ready to receive messages[1]. As a workaround we'll try again a |
200 // few times with a second delay. | 201 // few times with a second delay. |
201 // [1] - https://bugzilla.mozilla.org/show_bug.cgi?id=1418655 | 202 // [1] - https://bugzilla.mozilla.org/show_bug.cgi?id=1418655 |
202 setTimeout(doInit, 100); | 203 setTimeout(doInit, 100); |
203 }); | 204 }); |
204 }; | 205 }; |
205 if (window.tabs[0].status != "complete") | 206 if (window.tabs[0].status != "complete") |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
363 port.on("composer.isPageReady", (message, sender) => | 364 port.on("composer.isPageReady", (message, sender) => |
364 { | 365 { |
365 return readyActivePages.has(new ext.Page({id: message.pageId})); | 366 return readyActivePages.has(new ext.Page({id: message.pageId})); |
366 }); | 367 }); |
367 | 368 |
368 port.on("composer.ready", (message, sender) => | 369 port.on("composer.ready", (message, sender) => |
369 { | 370 { |
370 readyActivePages.set(sender.page, !checkWhitelisted(sender.page)); | 371 readyActivePages.set(sender.page, !checkWhitelisted(sender.page)); |
371 updateContextMenu(sender.page); | 372 updateContextMenu(sender.page); |
372 }); | 373 }); |
LEFT | RIGHT |