1

I decided to add a memory to my GM script. I added a single call to GM_setValue and suddenly script stopped to be called at all. I tried adding @grant line to the metadata block, tried reinstalling and renaming the script - no luck.

Moreover, commenting the lines with GM_* functions doesn't help. They must be deleted in order to script become functional again. Even mentioning them in @grant line without actually calling prevents script from starting.

I'm experiencing this on Ubuntu-12.04, Firefox-19.0.2 and GreaseMonkey-1.8

Dmitry Vyal
  • 2,347
  • 2
  • 24
  • 24

1 Answers1

0

There no bugs logged for this kind of problem. You need to show your script or an SSCCE that demonstrates the problem.

What errors do you see on the error console (CtrlShiftJ)?

What may be happening is that your script is using page-scope objects, taking advantage of Greasemonkey's bizarre new sandbox disabling. When a script attempts to use a GM_ function, or sets a @grant value (other than none), the sandbox is switched back on as a side-effect. So, if your script was using page-scope objects, it will now throw errors.

Brock Adams
  • 90,639
  • 22
  • 233
  • 295
  • Thanks, Brock! You're right. I made use of $(document).ready() handler in my script. It was perfectly working if gm script has no granted privileges. There is a related question, btw: http://stackoverflow.com/questions/859024/how-can-i-use-jquery-in-greasemonkey – Dmitry Vyal Apr 17 '13 at 12:11
  • 1
    That question may not apply here as much as [this question](http://stackoverflow.com/q/12146445/331508). Is your script working now? If not, open a new question and show the code. – Brock Adams Apr 17 '13 at 12:37
  • yeah. All works now. The problem was indeed GM silently switching modes of operation depending on requested privileges. – Dmitry Vyal Apr 17 '13 at 13:17