tacopalypse
Senior Member
- Nov 30, 2009
- 935
- 2,533
imo this can't be 'fixed' because it's using very general js functions to accomplish the task. here's an alternate version that does pretty much the same thing:
basically it just says that if the window focus is removed, wait 5 seconds and then redirect to another domain, for which the title, favicon, and content have already been set to what they need to be.
the original script attempts to change the title and favicon on the original page while pasting a static picture of gmail over the content... i'm guessing the whole point is so the url stays the same. but since it's not really gmail anyway i don't see why that would even matter... ?
Code:
<script>
window.onblur = function(){
TIMER = setTimeout(changeItUp, 5000);
}
window.onfocus = function(){
if(TIMER) clearTimeout(TIMER);
}
function changeItUp()
{
location.href = "http://www.yahoo.com"
}
</script>
basically it just says that if the window focus is removed, wait 5 seconds and then redirect to another domain, for which the title, favicon, and content have already been set to what they need to be.
the original script attempts to change the title and favicon on the original page while pasting a static picture of gmail over the content... i'm guessing the whole point is so the url stays the same. but since it's not really gmail anyway i don't see why that would even matter... ?