mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-17 23:08:33 +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) {
|
if (stored) {
|
||||||
let result = await browser.tabs.insertCSS(targetTabId, {code: 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);
|
let thisBorderifyRestored = borderifyRestored.bind(null, tab.id);
|
||||||
|
|||||||
Reference in New Issue
Block a user