更新: OP現在確認由於Greasemonkey被禁用而發生問題。沒有來自我的Greasemonkey腳本的警報或日誌輸出?
我試圖做一個簡單的Greasemonkey腳本,但它似乎並沒有做任何事情,任何有關出現在控制檯。
腳本:
// ==UserScript==
// @name test
// @namespace test
// @description testing script (jquery)
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js
// @include *
// @version 1
// @grant none
// ==/UserScript==
$(document).ready(function() {
alert("hello");
GM_log("hello, greasemonkey here");});
我已經嘗試過了沒有$(document).ready
和jQuery,但它仍然無法正常工作。
該腳本也運行。您看到了警報(除非您告知FF阻止站點發出警報)並且錯誤消息「未定義GM_log」已放入Firefox的錯誤控制檯中。 –
@BrockAdams恩,不適合我..你使用的是什麼版本的FF? – gandalf3
幾乎所有4.0版本的FF。 GM版本1.11-ish和更高版本。三重檢查了兩者的最新版本(FF 28.0 + GM 1.15)。 –