We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e9b42b commit bfaded1Copy full SHA for bfaded1
1 file changed
TargetBlank.user.js
@@ -1,6 +1,6 @@
1
// ==UserScript==
2
// @name 新标签页打开链接
3
-// @version 1.0.2
+// @version 1.0.3
4
// @author X.I.U
5
// @description 将网页中所有链接改为新标签页打开~
6
// @match *://*/*
@@ -27,6 +27,7 @@
27
28
// 修改为新标签页打开
29
function targetBlank() {
30
+ document.head.appendChild(document.createElement('base')).target = '_blank';
31
Array.from(document.links).forEach(function (_this) {
32
if (_this.href && _this.href.slice(0,4) === 'http') {
33
_this.target = '_blank'
0 commit comments