Direct Image Uploader

Directly upload local / rehost remote image(s) to whatever dedicated image host by dropping/pasting them to target field

اعتبارا من 02-05-2020. شاهد أحدث إصدار.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==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        https://*/torrents.php?id=*
// @match        https://*/forums.php?action=new*
// @match        https://*/forums.php?*action=viewthread*
// @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);
}