Javascript timer annoyance workarounds

Everyone knows this website experience: Download starts in... XX seconds.

How to find the identify and modify the correct countdown variable before e.g. 30s have passed?

My current (too slow) way: Using Chrome, inspect countdown part of the website, check for identifying parts of html code, search all files using Ctrl+Shift+F, however I cannot modify the variable in time (entering time_remaining=0 into the console probably does not affect the right scope of the timer functions)

3

2 Answers

An interesting challenge.

Why not save the complete webpage (ctrl+s) so you have time to look at the Javascript. Once you know what you want to rewrite, you could use something like Charles Proxy to rewrite the remote script when you encounter it in future.

Most of the sites I encountered with 30,60 second timers are client based and after modifying the page html from those 30s to 1s is usually what does the job best.

For example something like this that I am currently using in plain js:

//Auto clicks the download button, and skips the 30s wait time on Uploaded.net
if( window.location.href.indexOf("") != -1 ){ document.getElementById("captcha").getElementsByClassName("free")[0].click(); setTimeout(function(){ document.getElementById("captcha").getElementsByClassName("free")[0].getElementsByTagName("span")[0].getElementsByTagName("span")[0].textContent = "1"; }, 1000);
}

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like