Directly upload local / rehost remote image(s) to whatever dedicated image host by dropping/pasting them to target field
当前为
// ==UserScript==
// @name Direct Image Uploader
// @namespace https://greasyfork.org/users/321857-anakunda
// @version 1.01
// @description Directly upload local / rehost remote image(s) to whatever dedicated image host by dropping/pasting them to target field
// @author Anakunda
// @match https://passthepopcorn.me/*
// @match https://*/reportsv2.php?action=report&id=*
// @match http*://tracker.czech-server.com/upload2.php
// @match http*://tracker.czech-server.com/edit.php*
// @connect *
// @grant GM_xmlhttpRequest
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_deleteValue
// @require https://greasyfork.org/scripts/401725-globalfetch/code/globalFetch.js
// @require https://greasyfork.org/scripts/394414-ua-resource/code/UA-resource.js
// @require https://greasyfork.org/scripts/401726-imagehostuploader/code/imageHostUploader.js
// ==/UserScript==
'use strict';
if (document.domain == 'tracker.czech-server.com') document.querySelectorAll('input[name="urlobr"]').forEach(setInputHandlers);
if (document.URL.includes('/reportsv2.php')) {
setReportHandlers();
var reportTypeSelect = document.querySelector('select#type');
if (reportTypeSelect != null) reportTypeSelect.addEventListener('change', setReportHandlers);
}
function setReportHandlers() {
setTimeout(function() {
['input#proofimages', 'input#image'].forEach(selector => { document.querySelectorAll(selector).forEach(setInputHandlers) });
document.querySelectorAll('textarea#extra').forEach(setTextAreahandlers);
}, 2000);
}