我不知道会发生什么,似乎 Firefox 42.0b3 中的脚本(每晚 0.1.13pre)现在无法加载 JQuery,有人可以帮助我。这是原始代码
// ==UserScript==
// @id test
// @name test
// @version 1.0
// @namespace
// @author
// @description
// @include *
// ==/UserScript==
console.log($);
经过搜索我发现也许使用@require可以解决这个问题,所以修改了我的代码。
// ==UserScript==
// @id test
// @name test
// @version 1.0
// @namespace
// @author
// @description
// @include /*
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
console.log($);
这是萤火虫中的错误消息
SyntaxError: missing ; before statement
1> JS frame :: resource://scriptish/utils/Scriptish_evalInSandbox.js :: Scriptish_evalInSandbox :: line 38
2> JS frame :: resource://scriptish/utils/Scriptish_injectScripts.js :: Scriptish_injectScripts :: line 121
3> JS frame :: resource://scriptish/manager.js :: listener :: line 125
4> native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0