code cosmetics

This commit is contained in:
tophf 2018-02-15 16:48:00 +03:00
parent 683e73ceb9
commit c564aab48f

View File

@ -55,10 +55,11 @@
}, 200);
getTab(tabId).then(tab => (tabUrl = tab.url));
chrome.tabs.onUpdated.addListener((id, {url}) =>
id === tabId &&
url && url !== tabUrl &&
closeCurrentTab());
chrome.tabs.onUpdated.addListener((id, {url}) => {
if (id === tabId && url && url !== tabUrl) {
closeCurrentTab();
}
});
// close the tab in case the port didn't report onDisconnect
chrome.tabs.onRemoved.addListener(id => {
if (id === tabId) {