|
@@ -0,0 +1,23 @@
|
|
|
|
+// ==UserScript==
|
|
|
|
+// @name 自动处理跳转外链
|
|
|
|
+// @namespace http://tampermonkey.net/
|
|
|
|
+// @version 0.1
|
|
|
|
+// @description 自动处理很多网站跳转外链需要手动确认的问题
|
|
|
|
+// @author westinyang
|
|
|
|
+// @match *://gitee.com/link?target=*
|
|
|
|
+// @match *://www.oschina.net/action/GoToLink?url=*
|
|
|
|
+// @icon https://www.google.com/s2/favicons?sz=64&domain=gitee.com
|
|
|
|
+// @grant none
|
|
|
|
+// ==/UserScript==
|
|
|
|
+
|
|
|
|
+(function() {
|
|
|
|
+ 'use strict';
|
|
|
|
+
|
|
|
|
+ window.location.search.substr(1).split("&").every((item) => {
|
|
|
|
+ let val = item.split("=")[1];
|
|
|
|
+ if (val.startsWith("http")) {
|
|
|
|
+ location.href = decodeURIComponent(val);
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+})();
|