Aris-t2 / CustomJSforFx

custom scripts
GNU General Public License v3.0
238 stars 22 forks source link

tabstoolbar_doubleclick_opennewtab.uc.js - not work for FF 63+ ? #7

Closed pro100Hub closed 5 years ago

pro100Hub commented 5 years ago

@Aris-t2, can you check please works of this js script at 63+? I tested some of your other scripts and it works without problems, but this one does not want. Customizing mode > 'Titlebar' checkbox > unchecked - done.

I also tried the script from Endor8, but it also does not work.

pro100Hub commented 5 years ago

Think i understood. Does this script work only on panels without focus on tabs? Can it be modified to open a new tab with the focus on the entire tabs panel? Same principle: GIF image. This method is relevant for those who have a lot of tabs open.

Aris-t2 commented 5 years ago

Works fine here up to Firefox 65. Make sure you are double-clicking tabs toolbar not a tab or a button.

pro100Hub commented 5 years ago

Works fine

Because of the large number of tabs, I did not understand how it works at first. After I understood and wrote about it in my second post. The script works only on the empty space of the tab bar without the participation of the tabs themselves. Can you make adjustments to the script so that it works on the tabs too?

Aris-t2 commented 5 years ago

@pro100Hub This should do the trick:

var DoubleClickAnywhereOnTabsToolbar = {
  init: function() {

    try {

      gBrowser.tabContainer.addEventListener('dblclick', function abcd(e) {
        if(e.button==0) {

            e.stopPropagation();
            e.preventDefault();

            BrowserOpenTab();

        }
      }, true);

    } catch(e) {}

  }

}

setTimeout(function(){
  DoubleClickAnywhereOnTabsToolbar.init();
},500);
pro100Hub commented 5 years ago

@Aris-t2

This should do the trick:

Works wonderful! My low bow to you. You are a wonderful human. My handshake ;)