Including JS files in a GM userscript...

Subscribe to Including JS files in a GM userscript... 4 posts, 3 voices

 
yeti_c Scriptwright

At the moment my script works very well - but I want to improve my menu...

I was hoping to use some funky effects from scriptaculous...

However - to do that I need to add the JS files to my Script...

Is there a way to run include statements from within a GM script?

C.

PS I did a search but didn't find anything!

 
no0n Scriptwright

No. Think about it, when a user downloads your script, they don't download a package of scripts. They download one single script. If you want some library like scriptaculous in your script, you have to paste the whole thing in. I wouldn't recommend it.

 
LouCypher Scriptwright

It will be on GM 0.8

 
yeti_c Scriptwright

I woudln't be adding the "scriptaculous" as part of the package - I'd want to use it as a static resource...

So the best way (currently) would be to talk the owner of the site into including the JS in the pages that I need it?

Until GM 0.8 comes out.

C.