UserScripts & Greasemonkey: calling a website's JavaScript functions
问题 I'm creating a UserScript extension for Firefox & Chrome and I'm trying to use some of the code in the website's JavaScript, e.g.: function: myFunction(){ return Grooveshark.playNextSong(); } The problem is when I test this code, Grooveshark is a null reference. I know there are other people who have done it: see BetterGrooveshark But I don't know why my simple extension can't call Grooveshark's JavaScript functions. Do I need to 'append' my script to the document in order for this to work?: