Skip to content

Instantly share code, notes, and snippets.

@MaciekBaron
Created April 28, 2014 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaciekBaron/11385396 to your computer and use it in GitHub Desktop.
Save MaciekBaron/11385396 to your computer and use it in GitHub Desktop.
Adf.ly automated download script
// Can be used with e.g. Control Freak
if (window.location.pathname === "/ad/locked") {
var time = +$("#countdown").text() || 6;
setTimeout(function () {
window.location.href = window.location.href;
}, time * 1000);
} else {
var myfunc = function () {
if (typeof $("#skip_button").attr("href") == "undefined" || $("#skip_button").attr("href") == null || $("#skip_button").attr("href").length === 0) {
setTimeout(myfunc, 500);
} else {
window.location.href = $("#skip_button").attr("href");
}
}
myfunc();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment