Site logo

The Tired Donkey

Cocktails, Apple conundrums, taxes and other assorted stuff

Toggle JavaScript On/Off in Safari | Mac Software | The Tired Donkey

The Tired Donkey

Sitting Donkey
The Tired Donkey blogs about cocktails, ways to get the most out of your Mac at home, work, college . . . wherever. He used to write about the unending abuse suffered by the 51% of Americans who actually pay the federal income tax. But this became too depressing, and, frankly, no one wanted to read it.

Nevertheless, if you came here looking for the Tired Donkey's brilliant analysis of our dim-witted tax system, you can still find his earlier posts. Just check the archives or the
Site Map.

Note: The Tired Donkey is not advertiser supported, and he gets no benefit from any product mentioned on his site.

The Tired Donkey

Archives

Toggle JavaScript On/Off in Safari



images
Like most people who maintain websites, the Tired Donkey uses Google Analytics to see what kind of traffic he is generating. But he doesn’t like to have his own visits skew the results. The easiest way to avoid this is to use Chrome, Firefox or—God forbid—IE and add the new Google Analytics Opt-Out Browser Add-on. Ignoring for the moment the fact that the Tired Donkey is almost incapacitated by the mind-numbing lack of imagination illuminated by that name, you will notice that Google is not showing you any love if you are a user of Safari. Fear not. An alternate method for accomplishing the same thing is to simply turn off JavaScript in Safari because Analytics can’t record visits from JavaScript-disabled browsers. You might also want to turn off JavaScript just because it is annoying. Whatever. Keep reading to find out how to make this easy.
150px-Mozilla_Foundation_logo.svg
Turning JavaScript on and off several times a day is annoying: Safari — File — Preferences — Security Tab — uncheck “Enable JavaScript” box — visit Tired Donkey — admire the forceful prose — navigate away from Tired Donkey — File — Preferences — Security Tab — check “Enable JavaScript” box — collapse in exhaustion.

There had to be an easier way to do this, so the Tired Donkey turned to Google and immediately found this
blog post on Mac OS X Hints that contained a script that would toggle Safari’s JavaScript on and off. Beautiful. Now the Tired Donkey only needed to make it useful. Here’s how you can, too:
  • Go to the blog linked above and copy the script onto the Clipboard.
  • Start AppleScript Editor which is located in your Applications/Utilities folder.
  • Paste the script into the editing window.
  • Choose File / Save As and choose a name for your file. The Tired Donkey choose JavaScript Toggle as the name for his app.
  • In the drop-down box beside the words “File Format”, choose “Application.”
  • On the left hand side of the window make sure the location you are saving to is the Applications folder.
  • Press “Save.”
JavaScript Toggle
Now the script has become an application. Each time you run it, it will toggle Safari’s JavaScript reading engine on or off (and give you a little pop-up message describing which state it is in). Convenient.

If you would like, you can take two more steps: (1) park the application in your Dock, and (2) change the icon for your application from the standard script icon to one that is more identifiable for you.

To do this, (a) run the program, and (b) before clicking the “OK” button on the dialog box that appears, right-click on the application icon and select “Keep in Dock.” Now your application will always be available.

JavaScript Icon
Next, search the web for an alternate Mac icon that speaks to you regarding JavaScript. The Tired Donkey found a set of icons that looked like wooden Scrabble tiles and used the “J” tile (for JavaScript) as his new icon. When you have found the right icon, just follow the directions on this helpful Apple post to make the change.

The Tired Donkey

Sitting Donkey
The Tired Donkey blogs about cocktails, ways to get the most out of your Mac at home, work, college . . . wherever. He used to write about the unending abuse suffered by the 51% of Americans who actually pay the federal income tax. But this became too depressing, and, frankly, no one wanted to read it.

Nevertheless, if you came here looking for the Tired Donkey's brilliant analysis of our dim-witted tax system, you can still find his earlier posts. Just check the archives or the
Site Map.

Note: The Tired Donkey is not advertiser supported, and he gets no benefit from any product mentioned on his site.

The Tired Donkey

Archives