Greasy Fork

嗅探下载组合包

脚本整合

目前为 2025-03-23 提交的版本。查看 最新版本

// ==UserScript==
// @name         嗅探下载组合包
// @namespace    https://facaikotei.github.io/
// @version      2
// @description  脚本整合
// @author       (c)2025 facaikotei
// @match        *://*/*
// @grant        GM_addStyle
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_getResourceText
// @require      https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/jquery/2.2.4/jquery.min.js
// @require      https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/arrive/2.4.1/arrive.min.js
// @require      https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/jwerty/0.3.2/jwerty.min.js
// @resource     keymaster https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/keymaster/1.6.1/keymaster.js
// @license      MIT
// @homepageURL  https://greasyfork.org/scripts/529908
// ==/UserScript==

(function() {
    'use strict';

    window.eval(GM_getResourceText("keymaster").replace(/^[^{]*{/g, "").replace(/}[^}]*$/g, "").replace(/global\./g, "window."));

    $(function() {
        $(".MyBT").append("<div id='MyImage' class='jianBian'>图片<div style='opacity: 0;'>图片</div></div>");
        GM_addStyle(".MyBT>div>div{width:150px;}");
        $("#MyImage").click(function() {
            jwerty.fire(getKeys(GM_getValue("shortCutString") || "alt+W")[0]);
        });
    });
    $("body").arrive(".tyc-image-container", function() {
        GM_setValue("shortCutString", $(".shortCutString").val());
        $(".shortCutString").change(function() {
            GM_setValue("shortCutString", $(".shortCutString").val());
        });
    });
})();