Official Gmail Blog
News, tips and tricks from Google's Gmail team and friends.
Gmail/Greasemonkey API issue
January 29, 2008
Posted by Dan Pupius, Gmail engineer
First off, this update is only for those of you who write or run Greasemonkey scripts. If you don't have any third-party extensions installed or don't know what we're talking about, you can ignore this post.
Ok... looks like some of you are still reading.
We recently pushed a change so Gmail Javascript now loads in an iframe. The Greasemonkey bindings we expose still work as described in the
Gmail/Greasemonkey API
; however, there may be a side effect to how some scripts work. Since the "gmonkey" object is now loaded in the context of the JS frame, "window" in the Greasemonkey script is now a reference to the JS frame and not the main window. Some scripts depended on this behavior to modify aspects of the page without going through our APIs.
If you're the author of a Gmail Greasemonkey script, you should be able to work around the update by changing the window object used -- Mihai P. posted
an update to his Macros script
on Friday. If you are accessing the "gmonkey" object via a different mechanism, then you can reference it using top.js.gmonkey for now, and an update will be pushed this week that creates an alias in the main window's context.
Labels
buzz
calendar
Gmail Blog
Google Apps Blog
Google Calendar
googlenew
Inbox
Inbox by Gmail
labs
mobile
Offline
reader
tasks
tip
Archive
2016
Sep
Aug
Apr
Mar
Feb
Jan
2015
Dec
Nov
Oct
Sep
Jul
Jun
May
Apr
Mar
Feb
Jan
2014
Dec
Nov
Oct
Aug
Jul
Apr
Mar
Feb
Jan
2013
Dec
Nov
Oct
Sep
Jul
Jun
May
Apr
Mar
2012
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2011
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2010
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2009
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2008
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2007
Dec
Nov
Oct
Sep
Aug
Jul
Feed
Google
on
Follow @gmail
Follow
Give us feedback in our
Product Forum
.
Get posts via email
Email:
Powered by
Google Groups
Useful Links
About Gmail
Gmail for Mobile
Gmail for Work