Greasemonkey脚本编译器显示错误

时间:2013-12-02 09:02:53

标签: javascript firefox firefox-addon greasemonkey

我有这样的剧本

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

// ==/UserScript==

alert('barcelona');

此脚本适用于Greasemonkey。

我使用此链接编译了此脚本:
https://arantius.com/misc/greasemonkey/script-compiler.php

编译完成后,我在Firefox上添加了附加组件,现在显示:

  

错误:WrappedNative原型对象上的非法操作错误。

怎么了?

1 个答案:

答案 0 :(得分:3)

用户脚本编译器在很长一段时间内没有更新,并且它产生的输出加载项在最近的Firefox版本IIRC中停止工作。

如果要从用户脚本创建Firefox附加组件,则应考虑使用Add-on SDK并将用户脚本设为page mod。无论如何,这就是addons.mozilla.org编辑团队推荐的内容。

还有其他选择,例如Scriptify

相关问题