Guest User

Untitled

a guest
Dec 14th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. gBrowser.tabContainer.advanceSelectedTab(1 /* 1 or -1 */, true);
  2. if("TreeStyleTabService" in window) {
  3. var autoExpandDelay = TreeStyleTabService.getTreePref("autoExpandSubtreeOnSelect.whileFocusMovingByShortcut.delay") || 800;
  4. const ns = "__mouseGesturesTabsSwitcher__";
  5. var ts = ns in window && window[ns];
  6. if(!ts) {
  7. ts = window[ns] = {
  8. timer: 0,
  9. handleEvent: function(e) {
  10. window.removeEventListener("mouseup", this, true);
  11. this.clearDelayed();
  12. delete window[ns];
  13. },
  14. clear: function() {
  15. clearTimeout(this.timer);
  16. clearTimeout(TreeStyleTabService._autoExpandOnTabSelectTimer);
  17. },
  18. clearDelayed: function() {
  19. setTimeout(function(_this) {
  20. _this.clear();
  21. }, 10, this);
  22. }
  23. };
  24. window.addEventListener("mouseup", ts, true);
  25. }
  26. ts.clear();
  27. ts.tab = gBrowser.selectedTab;
  28. ts.timer = setTimeout(function() {
  29. var tab = gBrowser.selectedTab;
  30. if(tab == ts.tab)
  31. gBrowser.treeStyleTab.collapseExpandSubtree(tab, false);
  32. }, autoExpandDelay);
  33. }
Add Comment
Please, Sign In to add comment