Bug 1259729 fix attaching pocket styles on startup, r=jaws

This commit is contained in:
Shane Caraveo
2016-04-01 08:39:48 -07:00
parent 2e361b79a0
commit b00798bc51

View File

@@ -383,12 +383,8 @@ var PocketOverlay = {
CreatePocketWidget(reason);
PocketContextMenu.init();
if (reason != APP_STARTUP) {
for (let win of allBrowserWindows()) {
this.setWindowScripts(win);
this.addStyles(win);
this.updateWindow(win);
}
for (let win of allBrowserWindows()) {
this.onWindowOpened(win);
}
},
shutdown: function(reason) {
@@ -414,6 +410,8 @@ var PocketOverlay = {
PocketReader.shutdown();
},
onWindowOpened: function(window) {
if (window.hasOwnProperty("pktUI"))
return;
this.setWindowScripts(window);
this.addStyles(window);
this.updateWindow(window);