您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
2025/8/30 上午11:19:00
// ==UserScript== // @name swingvy 報賬貼上剪貼簿 // @namespace Violentmonkey Scripts // @match https://secure.swingvy.com/main.html* // @grant none // @version 1.0 // @author // @description 2025/8/30 上午11:19:00 // @license MIT // ==/UserScript== const temporallyPaste = document.createElement('div') document.addEventListener('paste', e => { const items = e.clipboardData && e.clipboardData.items if (!items) return; const dialog = document.querySelector('dialog') dialog.appendChild(temporallyPaste) for (const item of items) { if (item.type.indexOf('image') !== -1) { const reader = new FileReader(); reader.onload = e => { const image = new Image(); image.src = e.target.result; image.onclick = () => temporallyPaste.removeChild(image) image.setAttribute('title', 'click to remove') image.style = 'cursor: pointer;'; temporallyPaste.appendChild(image) } reader.readAsDataURL(item.getAsFile()) } } }) temporallyPaste.style = 'position: absolute; top: 2rem; left: 2rem;' document.body.appendChild(temporallyPaste)