🔥🔥🔥跳转链接直达🔥🔥🔥

跳转链接直达,去掉确定跳转链接页面,用于谷歌、知乎、CSDN

目前为 2022-01-29 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name 🔥🔥🔥跳转链接直达🔥🔥🔥
  3. // @description 跳转链接直达,去掉确定跳转链接页面,用于谷歌、知乎、CSDN
  4. // @namespace https://github.com/WindrunnerMax/TKScript
  5. // @version 1.2.0
  6. // @author Czy
  7. // @include *://*google.com/*
  8. // @include *://link.zhihu.com/*
  9. // @include *://link.csdn.net/*
  10. // @license MIT License
  11. // @supportURL https://github.com/WindrunnerMax/TKScript/issues
  12. // @require https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js
  13. // @run-at document-start
  14. // @grant unsafeWindow
  15. // @grant GM_xmlhttpRequest
  16. // ==/UserScript==
  17. (function () {
  18. 'use strict';
  19.  
  20. function styleInject(css, ref) {
  21. if ( ref === void 0 ) ref = {};
  22. var insertAt = ref.insertAt;
  23.  
  24. if (!css || typeof document === 'undefined') { return; }
  25.  
  26. var head = document.head || document.getElementsByTagName('head')[0];
  27. var style = document.createElement('style');
  28. style.type = 'text/css';
  29.  
  30. if (insertAt === 'top') {
  31. if (head.firstChild) {
  32. head.insertBefore(style, head.firstChild);
  33. } else {
  34. head.appendChild(style);
  35. }
  36. } else {
  37. head.appendChild(style);
  38. }
  39.  
  40. if (style.styleSheet) {
  41. style.styleSheet.cssText = css;
  42. } else {
  43. style.appendChild(document.createTextNode(css));
  44. }
  45. }
  46.  
  47. var css_248z = "";
  48. styleInject(css_248z);
  49.  
  50. var website$2 = {
  51. regexp: /google/,
  52. init: function ($) {
  53. document.addEventListener("DOMContentLoaded", function () { return $("#res a").attr("target", "_blank"); });
  54. },
  55. };
  56.  
  57. var website$1 = {
  58. regexp: /zhihu/,
  59. init: function () {
  60. var result = /.*link.zhihu.com\/\?target=(.*)/.exec(location.href);
  61. if (result) {
  62. var url = decodeURIComponent(result[1]);
  63. if (url) {
  64. console.log(url);
  65. location.href = url;
  66. }
  67. }
  68. },
  69. };
  70.  
  71. var website = {
  72. regexp: /csdn/,
  73. init: function () {
  74. var result = /.*link.csdn.net\/\?target=(.*)/.exec(location.href);
  75. if (result) {
  76. var url = decodeURIComponent(result[1]);
  77. if (url) {
  78. console.log(url);
  79. location.href = url;
  80. }
  81. }
  82. },
  83. };
  84.  
  85. var websites = [website$2, website$1, website];
  86.  
  87. (function ($) {
  88. var mather = function (regex, website) {
  89. if (regex.test(window.location.href)) {
  90. website.init($);
  91. return true;
  92. }
  93. return false;
  94. };
  95. websites.some(function (website) { return mather(website.regexp, website); });
  96. })($);
  97.  
  98. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址