diff --git a/background.js b/background.js index 82c5d06..1c797da 100644 --- a/background.js +++ b/background.js @@ -1,8 +1,7 @@ - -browser.tabs.onUpdated.addListener(async (tabId, changeInfo, tab) => { +browser.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { if (changeInfo.status !== 'complete') { browser.pageAction.hide(tabId); - await browser.storage.local.remove(`nl_tab_${sender.tab.id}`); + browser.storage.local.remove(`nl_tab_${sender.tab.id}`); return; } }, { properties: ["status"] }); diff --git a/manifest.json b/manifest.json index 45af339..8f32685 100644 --- a/manifest.json +++ b/manifest.json @@ -23,7 +23,7 @@ { "matches": [ "http://*/*", "https://*/*", "file:///*" ], "js": ["content.js"], - "run_at": "document_end" + "run_at": "document_start" } ], "page_action": {