Created
October 11, 2014 17:41
-
-
Save scottydelta/cbc1418ba766dccc7bec to your computer and use it in GitHub Desktop.
TamperMoneky Script to autoredirect AdFly after timer expires.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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