Skip to content

Instantly share code, notes, and snippets.

@ftf
Created November 16, 2011 12:25
Show Gist options
  • Save ftf/1369960 to your computer and use it in GitHub Desktop.
Save ftf/1369960 to your computer and use it in GitHub Desktop.
AppleScript for a flash free Chrome with a flash fallback user
(*
(c) 2011 Fabian Franke
Licence: Creative Commons Attribution-ShareAlike 3.0
Needs multiple user feature; chrome v16 and newer
1. disable flash plugin in chrome
2. create new chrome user/profile with flash enabled
3. edit theFlashChromeUser to your new flash user
4. assign an alfred.app global hotkey (or any other comfortable way to envoke) to this script
5. rage about without-flash-I-suck-website while browsing
6. press hotkey
7. enjoy the full legacy web experience
version history:
changed the way a tab gets closed
*)
set theFlashChromeUser to "flashy"
set theURL to ""
tell application "Google Chrome"
activate
set theURL to URL of active tab of window 1
close tab (active tab index of window 1) of window 1
tell application "System Events"
tell process "Google Chrome"
tell menu bar 1
tell menu bar item "Users"
tell menu "Users"
click menu item theFlashChromeUser
end tell
end tell
end tell
end tell
end tell
delay 1
if (URL of active tab of window 1 is not "chrome://newtab/") then
make new tab at end of tabs of window 1
end if
set URL of active tab of window 1 to theURL
end tell
name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment