您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
重定向 jQuery 库请求
// ==UserScript== // @name [银河奶牛]强化模拟网页助手 // @namespace http://tampermonkey.net/ // @version 1.02 // @description 重定向 jQuery 库请求 // @match https://doh-nuts.github.io/* // @license Truth_Light // @grant GM_xmlhttpRequest // @connect cdn.jsdelivr.net // ==/UserScript== (function() { const originalUrl = "https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"; const newUrl = "https//code.jquery.com/jquery-3.7.1.min.js"; GM_xmlhttpRequest({ method: "GET", url: newUrl, onload: function(response) { if (response.status === 200) { const script = document.createElement('script'); script.textContent = response.responseText; document.head.appendChild(script); } else { fallbackToOriginal(); } }, onerror: function() { fallbackToOriginal(); } }); function fallbackToOriginal() { GM_xmlhttpRequest({ method: "GET", url: originalUrl, onload: function(response) { if (response.status === 200) { const script = document.createElement('script'); script.textContent = response.responseText; document.head.appendChild(script); } } }); } })();