Auto Remote Upload + ToS

Automatically selects remote URL upload, ticks the TOS box, focuses the input area and allows uploading by pressing Enter on file hosting sites often used on Mobilism

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

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

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

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

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

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Auto Remote Upload + ToS
// @namespace    https://github.com/AbdurazaaqMohammed
// @version      1.1.2
// @description  Automatically selects remote URL upload, ticks the TOS box, focuses the input area and allows uploading by pressing Enter on file hosting sites often used on Mobilism
// @author       Abdurazaaq Mohammed
// @author       Abdurazaaq Mohammed
// @match        https://userupload.net/?op=upload_form
// @match        https://userupload.in/?op=upload_form
// @match        https://uploadrar.com/
// @match        https://devuploads.com/upload
// @match        https://dropgalaxy.vip/
// @match        https://dropgalaxy.co/
// @match        https://dropgalaxy.com/
// @match        https://dgdrive.xyz/
// @grant        none
// @homepage     https://github.com/AbdurazaaqMohammed/userscripts
// @license      The Unlicense
// @supportURL   https://github.com/AbdurazaaqMohammed/userscripts/issues
// ==/UserScript==

(function() {
  'use strict';

  var uploadButton = document.querySelector('.uploadbtn.btn-primary.btn');

  const url = window.location.href;
  const inputField = document.querySelector("textarea");
  setTimeout(function() { // Click on the input area
      if(inputField && document.activeElement !== inputField){
        inputField.focus();
      }
    }, 500);

  if (url.includes('dropgalaxy') || url.includes('dgdrive')) {
    document.querySelector("#tab-remote_upload > span").click();
  }
  else if (url.includes('userupload')) {
    document.querySelector("#select_url").click();
    document.querySelector(".custom-control-label").click();
  }
  else if(url.includes('devuploads')) {
    document.querySelector("#select_url").click();
  }
  else {
    const form = document.querySelector("#select_url");
    uploadButton = document.querySelector('#uploadurl > div.pull-right > button');
    const intervalId = setInterval(function() { //uploadrar refuses to work if you don't do this
      if(form) {
        form.click();
        clearInterval(intervalId);
      }
    }, 200);
  }

  document.addEventListener('keydown', function(e) {
    const key = e.key;
    if (key == "Shift") uploadButton.click();
    // You can add more keys or change them as you want. The documentation for key values can be found here: https://developer.mozilla.org/en-US/docs/web/api/ui_events/keyboard_event_key_values
  });

})();