Flash free OSX
I extended my AppleScript to surf the web with a flash free OSX, but have a flash chrome user as fallback handy. Now it automatically grabs the URL from the active tab of the foremost browser (Camino, Chrome, Firefox, Opera, Safari, Webkit), closes the tab and opens the URL within Google Chrome (since Chrome is shipped with its own Flash plugin version we can get rid of the system wide plugin). With the release of Chrome 14 Google added the possibility to create multiple user profiles. That comes in handy when we don’t want to have an active flash plugin all the time, but do not want to enable/disable it all the time.
For convenience I created an Alfred.app extension: openWithFlash.alfredextension (Extensions are a Powerpack feature , which is totally worth buying by the way)
If you want to use another script launcher, get the raw script at the end of this post
Alfred Extension
Just open the extension to install it. To make it work as easy as possible we have to do a couple simple things:
- At first we have to activate GUI scripting to allow AppleScript retrieving the formemost window and get to interact with browsers which offer only poor AppleScript support (I’m looking at you Firefox..). Open the System Preferences and find the Universal Access Prefpane. At the bottom check the Enable access for assistive devices.
- Now we create a Alfred.app Hotkey to invoke the script. Open up the Alfred.app preferences and jump to the hotkey panel. Click the + button in the lower left corner and choose
Extensions/Apple Script
. Then select the Apple Script Extension entry, select the open with Flash Script in the dropdown menu and choose a hotkey. - If you don’t have Camino, Firefox and Opera installed you need to delete some codeblocks from the script. Without deleting the blocks the script won’t execute. Over in the extensions panel, find the open with Flash Script in the AppleScript section. Scroll down the script and remove the code blocks for not installed browsers.
- If you want just Chrome to be your flash fallback you can skip this step, but if you want to use a separate flash free Chrome user for browsing you have to make a little change.Search for
theFlashChromeUser
and change it to your newly created user. Now you can open up chrome://plugins/ with your main user profile and happiely disable Flash - Let us delete the flash plugin from our system. If you are lucky, you will find an uninstaller at
/Applications/Utilities/Adobe Flash Player Install Manager
If not use the Finder and browse to/Libray/Internet Plugin-Ins
and delete theFlash Player.plugin
- Now let’s open some heavy flash site like derbauer and press the hotkey. If everything works out, the tab closes, Chrome starts and displays the site.On Firefox you have to release the shortcut keys fairly fast to get the wished result. (The script gives you about half a second)If nothing is happening, check the Console (
/Applications/Utilities/Console.app
) for more information.