作者shyangs (厚呦)
看板Browsers
标题Re: [-Fx-] Chrome的Smooth Gestures的Split Tabs
时间Mon Sep 16 20:00:11 2013
※ 引述《kaoh08 (AIR -the 1000th summer-)》之铭言:
: Smooth Gestures里的 Split Tabs手势:
: Split all tabs to the right of (and including) the current tab into a new
: window
: 把在右边的分页移到新的视窗
: Firefox的手势都没有这选项,也找不到对应套件。
let replaceRightTabsWithWindow = function(){
let childNodes = gBrowser.visibleTabs,
aTab = gBrowser.mCurrentTab,
index = childNodes.indexOf(gBrowser.tabs.item(aTab._tPos)),
newWindow = gBrowser.replaceTabWithWindow(aTab);
newWindow.addEventListener("load", function(){
while (++index < childNodes.length){
newWindow.gBrowser.swapBrowsersAndCloseOther(
newWindow.gBrowser.addTab(), childNodes[index]);
}
});
};
replaceRightTabsWithWindow();
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 111.255.217.64
1F:推 kaoh08:挖喔 大感谢! 09/16 21:43
2F:推 ThisIsNotKFC:还上色 真是贴心 09/16 21:57