Skip to content

Commit 9092e5d

Browse files
committed
新增 [新标签页打开链接] 脚本
1 parent 1ab2585 commit 9092e5d

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
| [<img src="http://bbs.zhiyoo.net/favicon.ico" height="16px" />](http://bbs.zhiyoo.net/forum.php?mod=forumdisplay&fid=42&filter=author&orderby=dateline) | **智友邦论坛 增强** | 自动签到、**自动回复**、自动无缝翻页、快捷回到顶部、附件... | **[安装](https://greasyfork.org/zh-CN/scripts/412362)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Zhiyoo-Enhanced.user.js)** |
3030
| [<img src="https://www.lanzou.com/favicon.ico" height="16px" />](https://www.lanzou.com) | **蓝奏云网盘 增强 \*** | 刷新不回根目录、**右键显示菜单**、自动显示更多文件、自动... | **[安装](https://greasyfork.org/zh-CN/scripts/419224)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Lanzou-Enhanced.user.js)** |
3131
| [<img src="https://translate.google.cn/favicon.ico" height="16px" />](https://translate.google.cn) | ~~_**Google 翻译 美化**_~~ | ~~_精简多余内容、修复翻译结果溢出屏幕问题_~~ | ~~_**[安装](https://zhuanlan.zhihu.com/p/286815739)** \| **[备用](https://zhuanlan.zhihu.com/p/286815739)**_~~ |
32+
| [<img src="https://user-images.githubusercontent.com/54703944/118383905-b5d32380-b634-11eb-8914-dcea8e628ed3.png" height="16px" />](https://github.com/XIU2) | **新标签页打开链接** | 将网页中所有链接改为新标签页打开~ | **[安装](https://greasyfork.org/zh-CN/scripts/426377)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/TargetBlank.user.js)** |
3233
| [<img src="https://www.52pojie.cn/favicon.ico" height="16px" />](https://www.52pojie.cn) | **吾爱破解论坛 美化** | 精简多余内容、样式优化 | **[安装](https://greasyfork.org/zh-CN/scripts/412681)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/52pojie-Beautification.user.js)** |
3334
| [<img src="https://www.52pojie.cn/favicon.ico" height="16px" />](https://www.52pojie.cn) | **吾爱破解论坛 增强** | **自动签到**、自动无缝翻页、屏蔽导读悬赏贴 (最新发表页)... | **[安装](https://greasyfork.org/zh-CN/scripts/412680)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/52pojie-Enhanced.user.js)** |
3435
| [<img src="https://i.loli.net/2021/03/30/tvOSNCmi4rIH3Ju.png" height="16px" />](https://hostloc.com) | **全球主机交流论坛 增强 \*** | **自动访问空间、屏蔽用户**、屏蔽关键词、自动无缝翻页等... | **[安装](https://greasyfork.org/zh-CN/scripts/414005)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Hostloc-Enhanced.user.js)** |

TargetBlank.user.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// ==UserScript==
2+
// @name 新标签页打开链接
3+
// @version 1.0.0
4+
// @author X.I.U
5+
// @description 将网页中所有链接改为新标签页打开~
6+
// @match *://*/*
7+
// @icon https://i.loli.net/2021/03/07/rdijeYm83pznxWq.png
8+
// @grant none
9+
// @license GPL-3.0 License
10+
// @run-at document-end
11+
// @namespace https://github.com/XIU2/UserScript
12+
// @supportURL https://github.com/XIU2/UserScript
13+
// @homepageURL https://github.com/XIU2/UserScript
14+
// ==/UserScript==
15+
16+
(function() {
17+
'use strict';
18+
Array.from(document.links).forEach(function (_this) {
19+
_this.target = '_blank'
20+
})
21+
})();

0 commit comments

Comments
 (0)