作者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
推 kaoh08:挖喔 大感謝! 09/16 21:43
推 ThisIsNotKFC:還上色 真是貼心 09/16 21:57