您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
follow /denali999 on twitch!
// ==UserScript== // @name catbox.moe paste // @namespace http://tampermonkey.net/ // @version 1.0 // @description follow /denali999 on twitch! // @author (osu! denali) (twitch /denali999) // @match https://catbox.moe/ // @icon https://www.google.com/s2/favicons?sz=64&domain=catbox.moe // @grant none // @run-at document-body // ==/UserScript== (function() { 'use strict'; var dz; Dropzone.options.dropzoneUpload.init = function() { this.on("success", function(file, responseText) { var para = document.createElement("div"); var textHolder = document.createElement("span"); var t = document.createTextNode(responseText); para.appendChild(textHolder); textHolder.appendChild(t); para.className = "responseText"; textHolder.className = "textHolder"; file.previewTemplate.appendChild(para); file.previewTemplate.style.borderColor = "#23B748"; file.previewTemplate.childNodes[3].childNodes[0].style.backgroundColor = "#23B748"; $(file.previewTemplate).find("span.textHolder").on('click', function(event) { if (event.which === 2 && !$(this).hasClass('disabled')) { window.open($(this).text(),'_blank'); $(this).removeClass('disabled'); return; } else if (event.which === 1 && !$(this).hasClass('disabled')) { var selection = window.getSelection(); var range = document.createRange(); range.selectNodeContents(textHolder); selection.removeAllRanges(); selection.addRange(range); document.execCommand('copy'); var oldtext = $(this).text(); $(this).text("Copied!"); $(this).fadeTo("slow", 0, function() { $(this).text(oldtext); $(this).fadeTo(0, 1); $(this).removeClass('disabled'); }); } $(this).addClass('disabled'); }); }); this.on("error", function(file, responseText) { file.previewTemplate.childNodes[3].childNodes[0].style.backgroundColor = "#FF5C5C"; }); dz = this; }; addEventListener("paste", (event) => { const items = (event.clipboardData || event.originalEvent.clipboardData).items; if (items.length == 1) { var item = items[0] if (item.kind === 'file') { // adds the file to your dropzone instance dz.addFile(item.getAsFile()) } } }) })();