// ==UserScript== // @name Anonfiles, Bayfiles, GoFile Auto Download // @namespace https://cracked.io/Faramir // @version 0.1 // @description Auto click download button. // @author Faramir // @license MIT // @match *://anonfiles.com/* // @match *://bayfiles.com/* // @match *://gofile.io/* // @icon https://www.google.com/s2/favicons?sz=64&domain=anonfiles.com // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; var anon = document.querySelector('#download-url'); var link = $("a[href*='download']"); // find & click download button for Anonfiles & Bayfiles. if (anon != null) { anon.click(); return; } var intv = setInterval(function() { if (link.length < 1) { return false; } // when the link is found, clear the timer interval. clearInterval(intv); window.location.href = link[0].href }, 100); })();