GMail Macros for Opera
Finally I am able to switch back to Opera as my main browser. Now that Opera has content blocker and web developer tools, the only thing that have been missing was GMail Macros.
The original GMail Macros script is written as an Greasemonkey extension for Firefox by Mihai Parparita. I have ported to it Opera to be used as a user script. Download it, and put it under C:\Program Files\Opera\userjavascript\. Log in to GMail and press ‘h’ to see the list of available keyboard shortcuts. See also Mihai’s original blog post for details about the functionality.
What I have done is to remove and change Greasemonkey specific code in the original script.
- All references to the ‘unsafeWindow’ object has been changed to ‘window’.
- The reference to GM_addStyle has been changed so that it works for other browsers as well, including Opera of course.
- The reference to style.MozOpacity has been changed to style.opacity.
It works like in Firefox, which means there are still some issues related to focus. If “the keyboard does not work”, then click somewhere inside the window.
Download it, and send me feedback!
As far as I know the original script is released under a BSD license, which means that so are my modifications.
UPDATE: If this is your first user script in Opera, then you must create the directory to store the scripts, and adjust your settings accordingly (Preferences -> Advanced -> Content -> Javascript options… >- User javascript files)

May 8th, 2007 at 21:39
Dear Alf,
Thank you much for your efforts of porting GMacros to Opera, and also for notifying me on lifehacker.com. I tried it today, immediately as I saw your note, but unfortunately I don’t see it working. I tried it with both http and https, also restarting Opera, but…
Activating the Error Console gave me the following notification:
User JS compilation
Syntax error C:\Program Files\Opera\userjavascript\GmailMacrosOpera.user.js: line 1 of User JS script :
sro 02>tTrai”
Seems nonsense, because there are no such characters in the file.
Would you have an idea what could be a problem? Or better yet, could you hint what to do to fix this? If you have time, of course.
Thanks a lot!
May 9th, 2007 at 08:52
Thanks for feedback!
I suspect it has something to do with character encoding and transfer over HTTP. On server it is stored encoded as UTF-8, with leading byte order mark.
You can try to download a zipped version of the script, or the ASCII version.
May 9th, 2007 at 23:31
Man, you made my day!!! (Or should I say night
Really, it was difficult to believe it, after so many months of trying to find a solution! Very cool to finally have this tool working!
You were probably right about encoding. I took the zipped version and didn’t even have to go further – worked like a charm! I have to add that I’ve changed the encoding in my Opera to “Automatic Selection”, as some time ago I had to select a specific one, and forgot that I didn’t revert back.
Many thanks, Alf, I greatly appreciate your efforts!!!
June 22nd, 2007 at 06:58
Takker for et kjekt script. Har begynt å bruke GMail ganske mye, så alt som kan gjøre det enklere er greit å ha.
Tipset også Google Tutor om at du har “oversatt” scriptet til Opera, http://www.googletutor.com/2007/06/19/empowering-your-gmail-with-firefox-and-greasemonkey/
June 22nd, 2007 at 16:11
Hmmm. Ser ikke ut som om de godkjente kommentaren min der jeg tipset om portingen din…
September 26th, 2007 at 03:39
Huge thank you for this! I’ve been leaning towards switching to Opera for some time and this really tipped the scale and made it an easy choice. Thanks again!
April 5th, 2008 at 11:23
[...] Gmail Macros for Opera [...]
October 20th, 2008 at 16:07
Does not seem to work for me on the latest; oh well! Gmail keeps on changing their APIs and so forth. Anyone updated their versions? I’m trying to switch from firefox and need my macros!