(function() { // IMPORTANT: when there's no filename, be sure to include a trailing slash at the end. const mypage = "file:///home/deadguy/.mozilla/firefox/thsxpwyd.testing-1586723279098/startpage/index.html"; // Clear the page's URL from the location bar. Normally not needed, as this should already be the default behavior. var clearlocationbar = "no"; aboutNewTabService.newTabURL = mypage; function customNewTab () { if (removefocus == "yes") { setTimeout(function() { gBrowser.selectedBrowser.focus(); }, 0); } if (clearlocationbar == "yes") { setTimeout(function() { if (gBrowser.selectedBrowser.currentURI.spec == mypage) { window.document.getElementById("urlbar").value = ""; } }, 1000); } } gBrowser.tabContainer.addEventListener("TabOpen", customNewTab, false); }());