|
阅读:3408回复:8
[扩展] 关闭当前页后选取
关闭当前页后选取
国人作品,顾名思义,就是可以自定义关闭当前标签页以后选择哪个标签页。扩展选项非常丰富,包括: 1、支持的选项包括: 最近访问标签页 父标签页(火狐57或更高版本) 第一个/左侧/右侧/最后一个 标签页 第一个/左侧/右侧/最后一个 未读 标签页 第一个/左侧/右侧/最后一个 同级/子/未读子 标签页(火狐57或更高版本) 2、以上通过自由组合使用的。 3、可以设定多套方案,第一方案不存在的话执行第二套方案,最多三套方案。 4、充分考虑键盘党,快捷键可套用不同的方案。 |
|
最新喜欢:
|
|
1楼#
发布于:2018-09-29 18:13
还是会先右边在激活左边,
|
|
|
2楼#
发布于:2018-09-30 09:27
安装这个扩展后,似乎可以解决拖曳多个标签后。在关闭标签时依次可以激活选取右边的标签进行依次关闭了。以前不能激活未读取标签,现在可以激活后再关闭了。
但是有个问题,如果下载某一个页面的文件时,点击下载后,会跳到下一个标签页 |
|
|
3楼#
发布于:2018-09-30 11:32
|
|
|
|
4楼#
发布于:2018-10-01 22:00
我的第一个ff扩展,有人做升级版了
|
|
|
|
5楼#
发布于:2018-10-02 08:50
在这个扩展的评论里,有人提到Gesturefy使用一种另外的方法避免了先右后左的闪烁
就是先切换到左侧标签,然后再关闭右边需要关闭的那个标签 代码地址如下,不知道能不能提取出来做成单独的UC脚本,配合keychanger来用https://github.com/Robbendebiene/Gesturefy/blob/67b20470387e7de80e38ff7cdb303a6537fde3ac/src/lib/actions.js#L72 Remove: function (data, settings) {
// remove tab if not pinned or remove-pinned-tabs option is enabled
if (settings.removePinnedTabs || !this.pinned) {
chrome.tabs.query({
windowId: this.windowId
}, (tabs) => {
// if there are other tabs to focus
if (tabs.length > 1) {
let nextTab = null, index;
// get right or left tab if existing
if (settings.removeTabFocus === "right" || settings.removeTabFocus === "left") {
if (settings.removeTabFocus === "right")
index = this.index < tabs.length - 1 ? this.index + 1 : this.index - 1;
else
index = this.index > 0 ? this.index - 1 : this.index + 1;
nextTab = tabs.find((element) => element.index === index);
}
// get the previous tab
else if (settings.removeTabFocus === "previous") {
nextTab = tabs.reduce((previous, current) => {
return previous.lastAccessed > current.lastAccessed || current.active ? previous : current;
});
}
if (nextTab) chrome.tabs.update(nextTab.id, { active: true });
}
chrome.tabs.remove(this.id);
});
}
},
RemoveRight: function () {
chrome.tabs.query({
currentWindow: true,
pinned: false
}, (tabs) => {
// filter all tabs to the right
tabs = tabs.filter((tab) => tab.index > this.index);
// create array of tap ids
tabs = tabs.map((tab) => tab.id);
chrome.tabs.remove(tabs);
});
},
RemoveLeft: function () {
chrome.tabs.query({
currentWindow: true,
pinned: false
}, (tabs) => {
// filter all tabs to the left
tabs = tabs.filter((tab) => tab.index < this.index);
// create array of tap ids
tabs = tabs.map((tab) => tab.id);
chrome.tabs.remove(tabs);
});
}, |
|
|
6楼#
发布于:2019-01-26 23:16
好啊,请问是不是可以做到关闭标签页后切换到上一次激活(浏览)的标签页?
|
|
|
7楼#
发布于:2019-01-26 23:25
感谢分享!解决了一个问题!
|
|
|
8楼#
发布于:2019-02-26 16:31
|
|