GreaseMonkey Hello World
Any ideas why this script isn't working?
Also, when I install the script the Name and Description field are blank?
//==UserScript==
//@name testName
//@namespace anonDeveloper
//@description This script will automagically blah blah blah
//@include *
//==/UserScript==
alert('Hello world!');
The script is located on my file system rather than s开发者_开发百科ome URI. Could that be causing the issue?
It works for me in the latest Google Chrome (you didn't say which browsers you tested). However, in order for the name and description to correctly display, you need to add a space after each //
:
// ==UserScript==
// @name testName
// @namespace anonDeveloper
// @description This script will automagically blah blah blah
// @include *
// ==/UserScript==
alert('Hello world!');
精彩评论