summaryrefslogtreecommitdiff
path: root/src/content/content.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/content.js')
-rw-r--r--src/content/content.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/content/content.js b/src/content/content.js
index e7fb331..eabf7c3 100644
--- a/src/content/content.js
+++ b/src/content/content.js
@@ -58,10 +58,6 @@ var notifyPage = async () => {
debug("Page %s shown, %s", document.URL, document.readyState);
if (document.readyState === "complete") {
try {
- if (!("canScript" in ns)) {
- ns.fetchPolicy();
- return;
- }
await Messages.send("pageshow", {seen: seen.list, canScript: ns.canScript});
return true;
} catch (e) {
@@ -74,8 +70,6 @@ var notifyPage = async () => {
return false;
}
-notifyPage();
-
window.addEventListener("pageshow", notifyPage);
ns.on("capabilities", () => {
@@ -105,3 +99,6 @@ ns.on("capabilities", () => {
notifyPage();
});
+
+ns.fetchPolicy();
+notifyPage();