suizhikuo-load-jquery

加载jquery脚本

当前为 2024-05-20 提交的版本,查看 最新版本

// ==UserScript==
// @name         suizhikuo-load-jquery
// @namespace    http://tampermonkey.net/
// @version      2024-04-09
// @description  加载jquery脚本
// @author       随智阔
// @match	     *://*/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @require      https://code.jquery.com/jquery-3.7.1.js
// @license      MIT
// ==/UserScript==

function confirmDialog(message, callback) {
    $("<div>" + message + "</div>").dialog({
        resizable: false,
        height: "auto",
        width: 400,
        modal: true,
        title: "确认框",
        buttons: {
            "确认": function () {
                $(this).dialog("close");
                callback();
            },
            "取消": function () {
                $(this).dialog("close");
            }
        }
    });
};

(function () {
    'use strict';
    // debugger;
    console.log("篡改猴(Tampermonkey)脚本 ---> 运行");
    console.log("篡改猴(Tampermonkey)脚本 --->j query-3.7.1.js");
    // 加载一个弹框
    confirmDialog("确定要执行此操作吗?", function () {
        // 用户点击确认的回调函数
        alert("操作已确认");
    });
})();