I wrote a safeWindow user script converter.
30 seconds to explain unsafeWindow...
but picture user scripts are running in a wrapper/scope like this
it's not quite this, but the plugin scope has similar issues to this
this converter fixes that ^ to run like this v
/* was file :///C:/Documents/greasy.user.js but is now inline */
alert("I'd like to use a server resource from the offline wrapper");
/* this ^ is now safe window scope */
More description of unsafeWindow and the converter here.
Web app in link ^