code cosmetics
This commit is contained in:
parent
683e73ceb9
commit
c564aab48f
|
@ -55,10 +55,11 @@
|
||||||
}, 200);
|
}, 200);
|
||||||
|
|
||||||
getTab(tabId).then(tab => (tabUrl = tab.url));
|
getTab(tabId).then(tab => (tabUrl = tab.url));
|
||||||
chrome.tabs.onUpdated.addListener((id, {url}) =>
|
chrome.tabs.onUpdated.addListener((id, {url}) => {
|
||||||
id === tabId &&
|
if (id === tabId && url && url !== tabUrl) {
|
||||||
url && url !== tabUrl &&
|
closeCurrentTab();
|
||||||
closeCurrentTab());
|
}
|
||||||
|
});
|
||||||
// close the tab in case the port didn't report onDisconnect
|
// close the tab in case the port didn't report onDisconnect
|
||||||
chrome.tabs.onRemoved.addListener(id => {
|
chrome.tabs.onRemoved.addListener(id => {
|
||||||
if (id === tabId) {
|
if (id === tabId) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user