Copy to discord

Copy emotes from twitch(7tv) and 7tv(website) convert to post on discord

// ==UserScript==
// @name        Copy to discord
// @namespace   Violentmonkey Scripts
// @match       https://www.twitch.tv/*
// @match       https://7tv.app/emotes/*
// @grant       none
// @version     1.0
// @run-at      document-end
// @author      Pipos https://discord.com/users/375407448795774976
// @description Copy emotes from twitch(7tv) and 7tv(website) convert to post on discord
// ==/UserScript==

(function() {
    function checkClipboard() {
        navigator.clipboard.readText().then(function(text) {
            let regex = /https:\/\/cdn\.7tv\.app\/emote\/([a-f0-9]+)\/(1|2|3|4)x\.(avif|webp)/g;
            let modifiedText = text.replace(regex, 'https://cdn.7tv.app/emote/$1/2x.gif');

            if (modifiedText !== text) {
                navigator.clipboard.writeText(modifiedText).then(function() {
                    return
                });
            }
        });
    }
    setInterval(checkClipboard, 200);
})();
长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元