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.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 https://userupload.net/?op=upload_form
  8. // @match https://userupload.in/?op=upload_form
  9. // @match https://uploadrar.com/
  10. // @match https://devuploads.com/upload
  11. // @match https://dropgalaxy.vip/
  12. // @match https://dropgalaxy.co/
  13. // @match https://dropgalaxy.com/
  14. // @match https://dgdrive.xyz/
  15. // @match https://apkadmin.com/
  16. // @grant none
  17. // @homepage https://github.com/AbdurazaaqMohammed/userscripts
  18. // @license The Unlicense
  19. // @supportURL https://github.com/AbdurazaaqMohammed/userscripts/issues
  20. // ==/UserScript==
  21.  
  22. (function() {
  23. 'use strict';
  24.  
  25. const url = window.location.href;
  26. const inputField = document.querySelector("textarea");
  27. setTimeout(function() { // auto focus the input field
  28. if(inputField && document.activeElement !== inputField){
  29. inputField.focus();
  30. }
  31. }, 500);
  32.  
  33. if (url.includes('dropgalaxy') || url.includes('dgdrive')) {
  34. document.querySelector("#tab-remote_upload > span").click();
  35. }
  36. else if (url.includes('userupload')) {
  37. document.querySelector("#select_url").click();
  38. document.querySelector(".custom-control-label").click(); //devuploads and uploadrar already enable TOS by default. I can't remember about DG
  39. }
  40. else {
  41. const form = document.querySelector("#select_url");
  42. const intervalId = setInterval(function() { //uploadrar refuses to work if you don't do this
  43. if(form) {
  44. form.click();
  45. clearInterval(intervalId);
  46. }
  47. }, 200);
  48. }
  49. })();