Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gBrowser.tabContainer.advanceSelectedTab(1 /* 1 or -1 */, true);
- if("TreeStyleTabService" in window) {
- var autoExpandDelay = TreeStyleTabService.getTreePref("autoExpandSubtreeOnSelect.whileFocusMovingByShortcut.delay") || 800;
- const ns = "__mouseGesturesTabsSwitcher__";
- var ts = ns in window && window[ns];
- if(!ts) {
- ts = window[ns] = {
- timer: 0,
- handleEvent: function(e) {
- window.removeEventListener("mouseup", this, true);
- this.clearDelayed();
- delete window[ns];
- },
- clear: function() {
- clearTimeout(this.timer);
- clearTimeout(TreeStyleTabService._autoExpandOnTabSelectTimer);
- },
- clearDelayed: function() {
- setTimeout(function(_this) {
- _this.clear();
- }, 10, this);
- }
- };
- window.addEventListener("mouseup", ts, true);
- }
- ts.clear();
- ts.tab = gBrowser.selectedTab;
- ts.timer = setTimeout(function() {
- var tab = gBrowser.selectedTab;
- if(tab == ts.tab)
- gBrowser.treeStyleTab.collapseExpandSubtree(tab, false);
- }, autoExpandDelay);
- }
Add Comment
Please, Sign In to add comment