2

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.

enter image description here

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;
        }
    }
}
Grady Player
  • 14,399
  • 2
  • 48
  • 76

1 Answers1

0

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?

Sudarshan
  • 18,140
  • 7
  • 53
  • 61
  • it seems to function fine, refreshing each minute while that page matches... I need to add some logging to see if it is actually being executed from the stale scripts. – Grady Player Jan 28 '13 at 22:38