Script to turn on the YouTube higher quality

Well as you people may have noticed youtube now features some videos in higher quality. There is a button you could press, it’s right below the “views”.

OR you could simply write “&fmt=18” at the end of the url. Good to have them in better quality but pasting “&fmt=18” at end of every single URL takes some time.

Then you could write a simple script instead

tell application "Safari"
	set current_url to the URL of current tab of window 1
	set current_url to current_url & "&fmt=18"
	set URL of current tab of window 1 to current_url
end tell

Sure that works.
But what I would like to do is having Safari running the script every time I watch a YouTube video, can it be done?

Model: MacBook 2,16 GHz
AppleScript: 2.2
Browser: Safari 525.18
Operating System: Mac OS X (10.5)

You can use FastScripts Lite to assign a hotkey to that script and hit it whenever you load a youtube video.

And thanks for telling me about that trick. Now I’m going to go see what other formats do…