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