您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
ascii2d搜图粘贴图像支持
// ==UserScript== // @name ascii2d粘贴图像搜图 // @namespace none // @license MIT // @version 0.1 // @description ascii2d搜图粘贴图像支持 // @match https://ascii2d.net/* // @grant none // ==/UserScript== (function() { 'use strict'; document.addEventListener('paste', function(event) { const clipboardData = event.clipboardData || window.clipboardData; if (clipboardData) { const items = clipboardData.items; for (let i = 0; i < items.length; i++) { const item = items[i]; if (item.kind === 'file') { const file = item.getAsFile(); const fileInput = document.querySelector('input[name="file"]'); if (fileInput) { const dataTransfer = new DataTransfer(); dataTransfer.items.add(file); fileInput.files = dataTransfer.files; const event = new Event('change', { bubbles: true }); fileInput.dispatchEvent(event); console.log('File pasted:', file); } break; } } } }); })();