Skip to content Skip to sidebar Skip to footer

Obfuscated Code Throws Error In A Greasemonkey Script

I have a Greasemonkey script that I want to be obfuscated. I was wondering what goes wrong with the available 'Packer' Javascript obfuscator. It compresses the script fine but afte

Solution 1:

Actually, your "Packed Script" works fine on my test page. You did keep the Metadata block as-is, right?

Also, you should add:

// @grant GM_setValue
// @grant GM_getValue

to the metadata block to (1) avoid jQuery (and other) conflicts and (2) ensure that those GM_ functions are always switched on.


Your problem is one or more of:

  1. You tried to pack or obfuscate the Metadata block. You cannot do this; the Greasemonkey add-on uses this precise, clear-text format to determine how to handle a given script.
  2. A conflict with a specific page. (The @grant settings, should fix that).
  3. Something in your code that you are not showing us.
  4. An edit error, installation error, or "confused" instance of Firefox.

    1. Uninstall the script.
    2. Completely shutdown Firefox, make sure all FF tasks have stopped.
    3. Restart FF and reinstall the script.
    4. Follow the troubleshooting tips starting at "Script Errors", on down.
    5. See, also, Troubleshooting (Script Authors)

Post a Comment for "Obfuscated Code Throws Error In A Greasemonkey Script"