Index: popup.js |
=================================================================== |
--- a/popup.js |
+++ b/popup.js |
@@ -38,32 +38,32 @@ |
{ |
return new Promise(resolve => |
{ |
function onMessage(message, sender) |
{ |
if (message.type == "composer.ready" && sender.page && |
sender.page.id == tab.id) |
{ |
- ext.onMessage.removeListener(onMessage); |
+ chrome.runtime.onMessage.removeListener(onMessage); |
resolve(); |
} |
} |
- ext.onMessage.addListener(onMessage); |
+ chrome.runtime.onMessage.addListener(onMessage); |
chrome.runtime.sendMessage({ |
type: "composer.isPageReady", |
pageId: tab.id |
}, |
ready => |
{ |
if (ready) |
{ |
- ext.onMessage.removeListener(onMessage); |
+ chrome.runtime.onMessage.removeListener(onMessage); |
resolve(); |
} |
}); |
}); |
} |
function onLoad() |
{ |