Step 2Rick Rollr
Code:
if(Math.random() > 0.98){
window.location.href = "http://www.google.com";
}
That's a 2% chance of your window being sent to the google page. Tweak the number between 0 and 1 for odds of it happening and the URL for the target video.
| « Previous Step | Download PDFView All Steps | Next Step » |














































Would there be any chance of this being updated and re-released?
Thanks!
if(Math.random() > 0.8){
window.location.href = "http://www.google.com";
}
That's a 20% chance of your window being sent to the google page. Tweak the number between 0 and 1 for odds of it happening and the URL for the target video.
Since many sites have iframes for ads, a single page can have 4 or 5 windows load for what looks like one. We ended up with .98 for the value to avoid it being utter chaos all the time.
My wife is going to hate me ;)
>=)