User:Smallman12q/Scripts/acc notify.user.js

// ==UserScript== // @name          acc notify // @namespace     http://en.wikipedia.org/User:Smallman12q/* // @include       http://toolserver.org/~acc/statistics.php // @description   A tool that will auto detect when someone requests an account for faster processing. Notifies you of open ACC requests. // ==/UserScript== //Released into Public Domain on August 14, 2009 by Smallman12q. //May 26, 2009 function reloadPage { window.location.reload(true) //alert("reloaded"); } function redirectpage {	//takes back to main page window.location.replace("http://toolserver.org/~acc/acc.php"); } function myScript { //if(document.location == "http://toolserver.org/~acc/acc.php")//check for certain site if(document.location == "http://toolserver.org/~acc/statistics.php")//check for certain site {		var html = document.getElementById("content"); var inner = html.innerHTML; if(html.innerHTML.indexOf("Open Requests 0") == -1) {			alert("Someone is here."); //redirectpage; window.location.replace("http://toolserver.org/~acc/acc.php"); }		//else //alert("no one is here."); //alert("reloading"); var randomnumber= Math.floor(Math.random*30000) + 10000;//random var t=setTimeout("window.location.reload(true)",randomnumber); } } /* Attaches script into page body and executes it via an anonymous function call. NOTES: Script can therefore reference variables on the page, but likewise cannot use Greasemonkey API methods var script = document.createElement("script"); script.type = "application/javascript"; script.innerHTML = "(" + myScript + ");"; document.body.appendChild(script);