eoger / tabcenter-redux

Vertical Tabs extension for Firefox
Mozilla Public License 2.0
381 stars 67 forks source link

Undo Close Tab Middle Click #332

Open zeroibis opened 6 years ago

zeroibis commented 6 years ago

Need a way to undo close tab when you middle click rather than create new tab.

Smile4ever commented 6 years ago

Ctrl+Shift+T?

zeroibis commented 6 years ago

I tried using the solution here: https://gist.github.com/Sporif/db6b3440fba0b1bcf5477afacf93f875 https://github.com/Endor8/userChrome.js/blob/master/Firefox-57/middle-click-undo-close-tab.uc.js

However, it is not working. Do I possibly need to edit something to make it compatible with tabcenter-redux?

Smile4ever commented 6 years ago

It specially mentions it's not compatible with Firefox 57. This is because the script uses gBrowser to work, which is not available anymore. What about Ctrl+Shift+T?

zeroibis commented 6 years ago

This used to be part of an extension in tab mix plus I believe. Starting in 57 it broke and this the linked code was made to run on css instead.

See: https://github.com/Sporif/firefox-quantum-userchromejs

Smile4ever commented 6 years ago

Oh, I didn't know that you could run this kind of code using userChrome.js. (not CSS, that's only for markup)

To make it compatible, the following probably needs updating for compatiblity with Tab Center Redux:

if (e.target.localName != 'tabs' && e.target.localName != 'toolbarbutton')