您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a button next to the quote to copy the image
// ==UserScript== // @name Quozio Panel Image Copier // @namespace http://tampermonkey.net/ // @version 1.0 // @description Adds a button next to the quote to copy the image // @author fishcat2431 // @match https://quozio.com/quote/* // @grant GM_setClipboard // @license GNU General Public License v3.0 // ==/UserScript== (function() { 'use strict'; function addCopyButton() { const panel = document.getElementsByClassName("quote-edit-image-panel text-center small-scroll")[0]; if (!panel) return; const img = panel.querySelector("img"); if (!img) return; if (document.getElementById("copyImageSrcBtn")) return; const btn = document.createElement("button"); btn.id = "copyImageSrcBtn"; btn.textContent = "Copy Image URL"; btn.style.marginLeft = "10px"; btn.style.padding = "5px 10px"; btn.style.cursor = "pointer"; btn.addEventListener("click", function() { GM_setClipboard(img.src); btn.textContent = "Copied!"; setTimeout(() => btn.textContent = "Copy Image URL", 1500); }); panel.parentNode.insertBefore(btn, panel.nextSibling); } addCopyButton(); const observer = new MutationObserver(addCopyButton); observer.observe(document.body, { childList: true, subtree: true }); })();