coofoUtils-iyuuUtils

iyuuUtils扩展包

Dieses Skript sollte nicht direkt installiert werden. Es handelt sich hier um eine Bibliothek für andere Skripte, welche über folgenden Befehl in den Metadaten eines Skriptes eingebunden wird // @require https://update.greatest.deepsurf.us/scripts/455671/1123035/coofoUtils-iyuuUtils.js

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         coofoUtils-iyuuUtils
// @namespace    https://github.com/coofo/someScript
// @version      0.0.3
// @license      MIT License
// @description  iyuuUtils扩展包
// @author       coofo
// @downloadURL  https://github.com/coofo/someScript/raw/main/tampermonkey/coofoUtils-iyuuUtils.user.js
// @supportURL   https://github.com/coofo/someScript/issues
// @require      https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @connect      iyuu.cn
// @grant        GM_registerMenuCommand
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_deleteValue
// ==/UserScript==

(function () {
    'use strict';

    //设置按钮
    GM_registerMenuCommand("设置iyuuToken", function () {
        let iyuuToken = GM_getValue("iyuuToken", "");
        Swal.fire({
            title: '设置iyuuToken',
            text: iyuuToken,
            input: 'text',
            inputAttributes: {
                autocapitalize: 'off'
            },
            showCancelButton: true
        }).then((result) => {
            if (result.isConfirmed) {
                GM_setValue("iyuuToken", result.value);
            }
        })
    });

    window.coofoUtils.iyuuUtils = {
        sendMsg: function (title, text) {
            let iyuuToken = GM_getValue("iyuuToken", "");
            if (iyuuToken === "") {
                return;
            }
            $.ajax({
                url: `https://iyuu.cn/${iyuuToken}.send`,
                type: 'get',
                data: {
                    text: title,
                    desp: text
                }
            });
        }
    };
})();