mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-16 06:18:35 +02:00
Only remove the listener if this is our tab
This commit is contained in:
@@ -42,8 +42,8 @@ browser.tabs.onCreated.addListener((tab) => {
|
||||
if (stored) {
|
||||
let result = await browser.tabs.insertCSS(targetTabId, {code: stored});
|
||||
}
|
||||
browser.tabs.onUpdated.removeListener(thisBorderifyRestored);
|
||||
}
|
||||
browser.tabs.onUpdated.removeListener(thisBorderifyRestored);
|
||||
}
|
||||
|
||||
let thisBorderifyRestored = borderifyRestored.bind(null, tab.id);
|
||||
|
||||
Reference in New Issue
Block a user