With @grant none
you cannot use any of the Greasemonkey functions such as GM_log
, GM_addStyle
, etc.
The reason why it fails is that using the GM_
functions require the sandbox to be enabled -- @grant none
disables this sandbox to allow code to run as it would on an ordinary page.
Instead of using GM_log
(which is deprecated), you should use console.log
instead.
Note that when you're running Greasemonkey code that errors only go to the browser console (or Firebug if you've enabled chrome logging) -- you can access the browser console by pressing Ctrl + Shift + J on Windows, and Cmd + Opt + J.