Closed 0rt closed 2 years ago
Haven't tested it, but probably because my userChromeJS runs earlier, before the element history-panelmenu
to exist. So in order to fix it you need to wrap the code in a DOMContentLoaded
or load
listener.
But please, note that this type of question is suited to Discussions and not here, so closing this.
document.getElementById("history-panelmenu").addEventListener("click",function(e){ if(e.button == 2){ e.stopPropagation(); e.preventDefault(); undoCloseTab(0); } },false)
I am using Firefox 101, and this script used to work with alice0775's userchrome.js. And I see it is loaded in rebuild userchrome.
The script itself is simple, right click on the history-panelmenu button will restored last closed tab.