Open direct image after converting on Ezgif

Open direct link to the image after converting on Ezgif

  1. // ==UserScript==
  2. // @name Open direct image after converting on Ezgif
  3. // @namespace https://github.com/AbdurazaaqMohammed
  4. // @version 1.0
  5. // @description Open direct link to the image after converting on Ezgif
  6. // @author Abdurazaaq Mohammed
  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. (function() {
  15. 'use strict';
  16.  
  17. setInterval(function() {
  18. const img = document.getElementById('output').getElementsByTagName('img')[0];
  19. if(img) {
  20. if (!img.src.endsWith('loadcat.gif')) {
  21. window.location.href = img.src;
  22. }
  23. }
  24. }, 500)
  25. })();