Auto Convert after upload on ezgif

Automatically clicks the convert button after you upload an image to ezgif to convert

  1. // ==UserScript==
  2. // @name Auto Convert after upload on ezgif
  3. // @namespace https://github.com/AbdurazaaqMohammed
  4. // @version 1.0
  5. // @author Abdurazaaq Mohammed
  6. // @description Automatically clicks the convert button after you upload an image to ezgif to convert
  7. // @match https://ezgif.com/*/*.*
  8. // @grant none
  9. // @homepage https://github.com/AbdurazaaqMohammed/userscripts
  10. // @license The Unlicense
  11. // @supportURL https://github.com/AbdurazaaqMohammed/userscripts/issues
  12. // ==/UserScript==
  13.  
  14. //check if the result image is there. The convert button remains after converting so we can't just check for that
  15.  
  16. (function() {
  17. 'use strict';
  18. setTimeout( function(){
  19. const form = document.querySelector(".primary.btn"); //submit button
  20. if(form) {
  21. if(!document.querySelector("#output").querySelector('img')) {
  22. form.click();
  23. }
  24. }}, 500);
  25. })();