阅读:3019回复:2
请教 鼠标手势(firegestures)添加 返回上次选中标签 的脚本
请问鼠标手势(firegestures)中添加返回上次选中标签的脚本是什么?也可以是tab mix plus 中“ctrl-tab 以最近被浏览的顺序切换标签页”的脚本
谢了先!!! |
|
1楼#
发布于:2009-01-25 21:01
if ("tabFocusManager" in FireGestures == false) { // init tab focus manager FireGestures.tabFocusManager = { _tabHistory: [], focusLastSelectedTab: function() { var currentPanel = gBrowser.mCurrentTab.getAttribute("linkedpanel"); while (this._tabHistory.length > 2) { var panel = this._tabHistory.pop(); if (panel == currentPanel) continue; var tab = document.getAnonymousElementByAttribute(gBrowser, "linkedpanel", panel); if (!tab) continue; gBrowser.selectedTab = tab; break; } }, handleEvent: function(event) { this._tabHistory.push(event.target.getAttribute("linkedpanel")); if (this._tabHistory.length > 32) this._tabHistory.shift(); }, }; gBrowser.mTabContainer.addEventListener("TabSelect", FireGestures.tabFocusManager, false); } FireGestures.tabFocusManager.focusLastSelectedTab(); |
|
2楼#
发布于:2009-01-25 21:01
saga2008:if ("tabFocusManager" in FireGestures == false) { // init tab focus manager FireGestures.tabFocusManager = { _tabHistory: [], focusLastSelectedTab: function() { var currentPanel = gBrowser.mCurrentTab.getAttribute("linkedpanel"); while (this._tabHistory.length > 2) { var panel = this._tabHistory.pop(); if (panel == currentPanel) continue; var tab = document.getAnonymousElementByAttribute(gBrowser, "linkedpanel", panel); if (!tab) continue; gBrowser.selectedTab = tab; break; } }, handleEvent: function(event) { this._tabHistory.push(event.target.getAttribute("linkedpanel")); if (this._tabHistory.length > 32) this._tabHistory.shift(); }, }; gBrowser.mTabContainer.addEventListener("TabSelect", FireGestures.tabFocusManager, false); } FireGestures.tabFocusManager.focusLastSelectedTab();回到原帖 这个好像有时可以但是有时又不可以阿 |
|