1

I have script like this

// ==UserScript==
// @name          messi
// @namespace     http://messi.com
// @description   example script to alert "barcelona" on userscripts page
// @include       http://userscripts.org/*

// ==/UserScript==

alert('barcelona');

this script works with Greasemonkey.

I compiled this script using this link:
https://arantius.com/misc/greasemonkey/script-compiler.php.

After compilation I added add-on to Firefox, now it showing:

Error: Illegal operation on WrappedNative prototype objec error .

whats wrong ?

Brock Adams
  • 90,639
  • 22
  • 233
  • 295
open source guy
  • 2,727
  • 8
  • 38
  • 61

1 Answers1

3

The user script compiler wasn't updated in quite some time and the output add-ons it produces stopped working in recent Firefox versions IIRC.

If you want to create Firefox add-ons from userscripts, you should consider using the Add-on SDK and making your user-script a page mod. That is what the addons.mozilla.org editor team is recommending, anyway.

There are other alternatives, such as Scriptify.

nmaier
  • 32,336
  • 5
  • 63
  • 78