2

I'm working on a user script that's growing in size and getting a little bit hard to manage, so I was thinking of moving some functionality to a separate .js file (or files). AFAIK, (since GM 4.0) you can't really access your script's location on disk since it's not stored as such, so there's not a directory in which you could put additional .js files you might want to use (and then load them with @require or @resource). This also extends to .css files. Is this correct? GM's wiki seems to be either outdated or incomplete.

Is there a workaround for this? I'm fairly new to the user script arena, but I feel like this should be pretty straightforward.

Brock Adams
  • 90,639
  • 22
  • 233
  • 295
Cren7ist
  • 41
  • 2
  • This is one of the many things busted by GM4 and Firefox "Quantum". Some have reported success with *Tampermonkey* and `@require`ing local files. But I've yet to find a decent workaround for developing scripts since Firefox went fubar. – Brock Adams Apr 06 '18 at 20:14
  • Nearly duplicate: https://stackoverflow.com/questions/49509874/how-to-update-tampermonkey-script-to-a-local-file-programatically – Brock Adams Apr 06 '18 at 20:18

0 Answers0