Greasy Fork

Greasy Fork is available in English.

[银河奶牛]强化模拟助手

重定向 jQuery 库请求

当前为 2024-09-26 提交的版本,查看 最新版本

// ==UserScript==
// @name         [银河奶牛]强化模拟助手
// @namespace    http://tampermonkey.net/
// @version      1.01
// @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://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js";
    GM_xmlhttpRequest({
        method: "GET",
        url: newUrl,
        onload: function(response) {
            const script = document.createElement('script');
            script.textContent = response.responseText;
            document.head.appendChild(script);
        }
    });
})();