您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Quickly extract emoji URL from Discord when Shift+Clicking and copy it to clipboard with size=48, otherwise use default behavior. This is useful if you don't have nitro and still want to use animated emotes or any emote as a gif instead as a cheap mans emoji.
当前为
// ==UserScript== // @name Discord Emoji URL Extractor (Shift Modifier) // @namespace http://greasyforks.org/editasdna09s8dnasda // @version 1.0 // @description Quickly extract emoji URL from Discord when Shift+Clicking and copy it to clipboard with size=48, otherwise use default behavior. This is useful if you don't have nitro and still want to use animated emotes or any emote as a gif instead as a cheap mans emoji. // @author Cragsand // @license MIT // @match *://discord.com/* // @grant GM_setClipboard // ==/UserScript== (function() { 'use strict'; document.addEventListener('click', async function(event) { // Check if Shift is held down if (!event.shiftKey) { return; // Allow normal Discord behavior } let emojiButton = event.target.closest('.emojiItem_fc7141'); // Find clicked emoji button if (emojiButton) { event.stopPropagation(); event.preventDefault(); let emojiImg = emojiButton.querySelector('img'); if (emojiImg && emojiImg.src) { let emojiURL = new URL(emojiImg.src); emojiURL.searchParams.set('size', '48'); // Force size=48 // Copy modified emoji URL to clipboard try { await navigator.clipboard.writeText(emojiURL.toString()); } catch (err) { console.error("Clipboard copy failed, using fallback:", err); GM_setClipboard(emojiURL.toString()); // Tampermonkey fallback } } } }, true); })();