Am 31.07.2011 23:09, schrieb candicecold1 cand:
// ==UserScript==
// @name                Hello World
// @namespace           http://www.oreilly.com/catalog/greasemonkeyhacks/
// @description         example script to alert "Hello world!" on
every page
// @include             *
// @exclude             http://oreilly.com/*
// @exclude             http://www.oreilly.com/*
// ==/UserScript==

alert("worked");

----------------------------------------------------------------------------------------------------------
Can someone please tell me what i am doing wrong in this code. isn;t
this suppose to pop up an alert box worked then why doesnt it .. its a
basic example from greasemonkey tutorial doc


This script works for me. This is what might be wrong:

1) You tested it on one of the two @exclude domains.
2) The "every page" is wrapped in your file (not sure whether this was copied like that or was wrapped by the mail-programm) 3) Your Greasemonkey or this particular script is currently deactivated. Check both in the Monkeymenu that appears if you click on the small arrow of the GM button in the toolbar. 4) You did not create/install the script properly. The header "setup" (all above the alert) is just applied ONCE, either when you create or install a userscript. Changes to any of the attributes do not affect the behaviour or appearance of that initial setup. The way out: Unless you changed either the @name or @namespace, you can simply "reinstall" the script with the changed attributes to override the old setup: Open the userscript tab in your add-on-manager, right-click on the script and select "Show Containing Folder". The open the .user.js file in that folder with Firefox again by dragging the file into a Firefox window.

HTH, Chris

--
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to