The context here is a Safari Extension, the script is added as an "End Script" in an extension. The purpose is to make MS exchange Web Access on Safari less painful, just by refreshing periodically... The main thing I am noticing is that according to the web inspector it adds this .js file each and every reload.
here is the code, if it is relevant:
if (window.top === window) {
var whitelistURLPartials = ["ae\=Folder","ae\=Item\&t\=IPM.Note\&id"];
var current = window.location.href;
for (var index in whitelistURLPartials)
{
if(current.match(whitelistURLPartials[index]))
{
window.setTimeout(function(){document.location.reload(true)},1000*60);
break;
}
}
}
I am not sure what you want to achieve, you are bound to an infinite Loop of Forever Loading Pages when you strike a match.
I tried your scenario in Chrome Extensions and Safari 5.1.7 they are not added as in your Screen shot.
Is your Script being executed multiple times or Is it only visually wrong?