Discussions » Development

Pulling external resources

§
Posted: 2017-11-29

Pulling external resources

I'd like to pull an external files to my userscript. To clarify, with the modularity in mind, I'd like to split some html elements into separate file, a css into a separate file and a json into a separate file. Then I'd like the main userscript pull those resources in and use them. These are not 3rd party resources, they would be my content - a part of the script itself. So my question is two-part. How would I handle it on the javascript-side, and second question is whether I'm able to host those on greasyfork, or do I need some other hosting - i.e. github.

thanks in advance.

§
Posted: 2017-11-30

If you really want, you can have these separate for development, then have a build script that combines them and outputs as a single JS file for installation.

Post reply

Sign in to post a reply.