Auto Remote Upload + ToS

Automatically selects remote URL upload and ticks the TOS box on file hosting sites often used on Mobilism

当前为 2024-03-16 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Auto Remote Upload + ToS
  3. // @namespace https://github.com/AbdurazaaqMohammed
  4. // @version 1.0.1
  5. // @description Automatically selects remote URL upload and ticks the TOS box on file hosting sites often used on Mobilism
  6. // @author Abdurazaaq Mohammed
  7. // @match *://userupload.*/?op=upload_form
  8. // @match *://uploadrar.com/
  9. // @match *://devuploads.com/upload
  10. // @match *://dropgalaxy.*/
  11. // @match *://dgdrive.xyz/
  12. // @grant none
  13. // @homepage https://github.com/AbdurazaaqMohammed/userscripts
  14. // @license The Unlicense
  15. // @supportURL https://github.com/AbdurazaaqMohammed/userscripts/issues
  16. // ==/UserScript==
  17.  
  18. (function() {
  19. 'use strict';
  20.  
  21. const url = window.location.href;
  22.  
  23. if (url.includes('dropgalaxy') || url.includes('dgdrive')) {
  24. document.querySelector("#tab-remote_upload > span").click();
  25. }
  26. else if (url.includes('userupload')) {
  27. document.querySelector("#select_url").click();
  28. document.querySelector(".custom-control-label").click();//devuploads and uploadrar already enables TOS by default. I can't remember about DG
  29. }
  30. else {
  31. const form = document.querySelector("#select_url");
  32. const intervalId = setInterval(function() { //uploadrar refuses to work if you don't do this
  33. if(form) {
  34. form.click();
  35. clearInterval(intervalId);
  36. }
  37. }, 200);
  38. }
  39. })();