Try: http://mark.biek.org/blog/2009/03/using-prototypejs-with-greasemonkey/ http://jimbojw.com/wiki/index.php?title=Using_Prototype_and_Scriptaculous_with_Greasemonkey
I don't think you can do it using require, not exactly sure why, but you shouldn't need to add an anonymous function wrapper unless you are using @unwrap (or try pasting the source into your script to avoid re- download although it may need some modification) On Jul 24, 3:11 pm, Robert <[email protected]> wrote: > Hello group, > > I'm trying to include Prototype into a Greasemonkey script, but have > not been successful so far. > > Below is the script I'm currently using (basically straight > fromhttp://wiki.greasespot.net/Code_snippets#jQuery_in_Greasemonkey_scrip... > ). > I've tried playing around with the Prototype version, chaning it to > 1.6.0.2, .1 and .0, and loading it directly from prototypejs.com, and > also from my own webspace, but no success. > I also tried to remove the anonymous function around the alert, no > joy. > The file is being downloaded into the profiles directory, and there is > no error message or anything pointing out what is happening. It just > doesn't work. > > Interestingly, jQuery seems to work without a problem. > > Any help appreciated. > > Robert > > // ==UserScript== > // @name Prototype Test > // @namespace http://localhost/ > // @description Test Prototype > // @include http://localhost/* > // @require > http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js > // ==/UserScript== > > // Anonymous function wrapper > (function() { > alert('echo'); > > > > })(); // end anonymous function wrapper --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
