Greasemonkey script compiler is showing an error

强颜欢笑 提交于 2019-12-19 10:53:46

问题


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 ?


回答1:


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.



来源:https://stackoverflow.com/questions/20324365/greasemonkey-script-compiler-is-showing-an-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!