diff --git a/README.md b/README.md index 4bdb4f0..68f6bb8 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ | [](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)** | | [](https://www.lanzou.com) | **蓝奏云网盘 增强 \*** | 刷新不回根目录、**右键显示菜单**、自动显示更多文件、自动... | **[安装](https://greasyfork.org/zh-CN/scripts/419224)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Lanzou-Enhanced.user.js)** | | [](https://translate.google.cn) | ~~_**Google 翻译 美化**_~~ | ~~_精简多余内容、修复翻译结果溢出屏幕问题_~~ | ~~_**[安装](https://zhuanlan.zhihu.com/p/286815739)** \| **[备用](https://zhuanlan.zhihu.com/p/286815739)**_~~ | +| [](https://github.com/XIU2) | **新标签页打开链接** | 将网页中所有链接改为新标签页打开~ | **[安装](https://greasyfork.org/zh-CN/scripts/426377)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/TargetBlank.user.js)** | | [](https://www.52pojie.cn) | **吾爱破解论坛 美化** | 精简多余内容、样式优化 | **[安装](https://greasyfork.org/zh-CN/scripts/412681)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/52pojie-Beautification.user.js)** | | [](https://www.52pojie.cn) | **吾爱破解论坛 增强** | **自动签到**、自动无缝翻页、屏蔽导读悬赏贴 (最新发表页)... | **[安装](https://greasyfork.org/zh-CN/scripts/412680)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/52pojie-Enhanced.user.js)** | | [](https://hostloc.com) | **全球主机交流论坛 增强 \*** | **自动访问空间、屏蔽用户**、屏蔽关键词、自动无缝翻页等... | **[安装](https://greasyfork.org/zh-CN/scripts/414005)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Hostloc-Enhanced.user.js)** | diff --git a/TargetBlank.user.js b/TargetBlank.user.js new file mode 100644 index 0000000..702a269 --- /dev/null +++ b/TargetBlank.user.js @@ -0,0 +1,21 @@ +// ==UserScript== +// @name 新标签页打开链接 +// @version 1.0.0 +// @author X.I.U +// @description 将网页中所有链接改为新标签页打开~ +// @match *://*/* +// @icon https://i.loli.net/2021/03/07/rdijeYm83pznxWq.png +// @grant none +// @license GPL-3.0 License +// @run-at document-end +// @namespace https://github.com/XIU2/UserScript +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript +// ==/UserScript== + +(function() { + 'use strict'; + Array.from(document.links).forEach(function (_this) { + _this.target = '_blank' + }) +})(); \ No newline at end of file