autoclose-newtab/background.js

7 lines
215 B
JavaScript
Raw Permalink Normal View History

2020-10-13 19:03:08 +02:00
function autoCloseNewTab(tabId, changeInfo, tab) {
console.log(tabId, changeInfo, tab)
if (tab.url.trim() === "about:newtab")
browser.tabs.remove([tabId]);
}
browser.tabs.onUpdated.addListener(autoCloseNewTab);