Skip to content

Instantly share code, notes, and snippets.

@scottydelta
Created October 11, 2014 17:41
Show Gist options
  • Save scottydelta/cbc1418ba766dccc7bec to your computer and use it in GitHub Desktop.
Save scottydelta/cbc1418ba766dccc7bec to your computer and use it in GitHub Desktop.
TamperMoneky Script to autoredirect AdFly after timer expires.
// ==UserScript==
// @name Adfly
// @namespace http://pastemehere.com
// @version 0.1
// @require http://code.jquery.com/jquery-latest.js
// @description TamperMonkey script to automate Adfly wait
// @author https://github.com/scottydelta
// @match http://adf.ly/*
// @grant none
// ==/UserScript==
$(document).ready(function() {
function test(){
var a= $('#skip_button').attr('href');
if(window.location.pathname=="/ad/locked"){
setTimeout(refresh, 10000); //wait 10000 millisecnds then reload the page
}
else if(typeof a =="undefined"){
setTimeout(test, 2000); //wait 2000 millisecnds then recheck
return;
}
else{
window.location.replace(a);
}
}
function refresh(){
location.reload();
}
test();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment