You didn't mention what version of Safari you're using, but in Safari 5, if you have JavaScript disabled when you visit a page, then enable JavaScript, it does not load any JavaScript until you refresh the page or go to a new page. That behavior may or may not have changed with Safari 6. I use JavaScript Blocker to manage JavaScript on sites I visit.In Safari when JavaScripts is turned from off to on, it loads js in all tabs in all windows.
Is there any extension/plugin/... which loads js only in current tab or only in new tabs?
safari.application.activeBrowserWindow.activeTab
function isItOkay() {
var myMessageData = event.url;
var theAnswer = safari.self.tab.canLoad(event, myMessageData);
if (theAnswer == "block") {
event.preventDefault();
}
}
document.addEventListener("beforeload", isItOkay, true);
function blockOrAllow(event) {
if (event.name === "canLoad") {
var itsAnAd = event.message.match(/ads.example.com/i);
if (itsAnAd) {
event.message = "block";
}
else {
event.message = "allow";
}
}
}
safari.application.addEventListener("message", blockOrAllow, true);