Javascript timer annoyance workarounds

0

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)

user2305193

Posted 2016-12-29T12:33:23.483

Reputation: 113

Wait 30 seconds; Use some kind of download manager; pay for the premium access that doesn't have the timer; click the "download now" link. As it would depend on the actual page you would have to dig into each pages code to find the corresponding piece. In addition they might actually have a timer running on the backend (unlikely but hey it's a possibility). – Seth – 2016-12-29T12:50:57.170

@Seth: The thing is, it's more a game for powerusers, hence the question. I'm sure I'm not the only person who thought about this- so I'm wondering if there is a smart approach. Also, please don't assume it's just about circumventing payment methods, as I do pay for the ones I use often. It's about spending e.g. ~25s out of 30s to learn and change a piece of running javascript. – user2305193 – 2016-12-29T12:57:52.050

It would be just one kind of service. I also mentioned the "download now" link which is available on a lot of free sites. As each site would be different I can't imagine that there would be a smarter way than just following the script. You might be able to use a profiler to find a piece of code that is ran often or you might be able to just look for common timer names (assuming the JS is not minified/they're relying on setTimeout). But most if not all of those approaches would take you longer than 30 seconds. – Seth – 2016-12-29T13:04:15.097

Answers

0

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.

https://www.charlesproxy.com/documentation/tools/rewrite/

Laurence Lord

Posted 2016-12-29T12:33:23.483

Reputation: 1

0

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("http://uploaded.net/file/") != -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);
}

PredatorIWD

Posted 2016-12-29T12:33:23.483

Reputation: 101