"@grant none" (or auto-detected none) combined with JQuery == Bad News

111 views
Skip to first unread message

Jay Rossiter / Signe

unread,
Aug 27, 2012, 10:03:18 PM8/27/12
to greasemon...@googlegroups.com

I saw a lot of complaints on the addons page about how scripts that @require
jquery weren't working. I started encountering the same issue when I got
upgraded last night. At first, I thought that it was RES (Reddit Enhancement
Suite) that was causing the problems, but it turns out that it was a small
script that I had written that was also running. This is the problem in short:

When using @grant none, or auto-detect with no GM_* functions, the @required
version of JQuery is stomping on the one that's loaded in the "unsafeWindow"
namespace (because they're now the same). By adding a simple "@grant GM_log",
all of the problems disappear because JQuery is being loaded in the sandboxed
window.

So, either all scripts need to add a @grant line to continue working, or
the new auto-detection needs to be reconsidered. IMO, continuing with the old
behavior and only using the unsandboxed behavior when "@grant none" is
specified seems to be the best idea for backwards compatibility.

--
Jay Rossiter http://www.cothlamadh.net/
503.896.6187 si...@cothlamadh.net

Anthony Lieuallen

unread,
Aug 28, 2012, 9:01:21 AM8/28/12
to greasemon...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages