Reputation: 10823
I've noticed when I shift click on the new tab icon, it opens a New window. I want to disable the shift modifier for this or at least force it to open a new Tab instead of a new Window. Bonus points would be disable the shift modifier across the browser UI.
Might be similar to the question: Prevent the closing of a tab with firefox addon sdk API
Tried searching https://dxr.mozilla.org/mozilla-central/source/ for gBrowser newWindow, open & the such and come up empty. I can't find the XUL where that new Tab icon should be defined. Be good if you could please indicate how you find these UI elements to override!
Upvotes: 1
Views: 733
Reputation: 10823
Thanks to noida on #extdev Mozilla IRC, for pointing out: https://dxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#8088
Tbh I don't quite understand how to override BrowserOpenNewTabOrWindow so I ended up overriding at the XUL that calls that function to BrowserOpenTab.
It's not a perfect solution since I ideally want to unbind OpenBrowserWindow altogether.
Upvotes: 1