blob: c981e282e8315cd7489a2ea02fdd25b79f4e4624 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
document.addEventListener("DOMContentLoaded", async e => {
// Fix for Fx57 bug where bundled page loaded using
// browser.windows.create won't show contents unless resized.
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1402110
let win = await browser.windows.getCurrent({populate: true});
if (win.tabs[0].url === document.URL) {
debug("Resize hack");
await browser.windows.update(win.id, {
width: win.width + 1
});
await browser.windows.update(win.id, {
width: win.width
});
}
});
|