I've noticed that you can apparently import a local script and make it global. How do you do that?
Topic on Extension talk:GlobalCssJs/Flow
You can pass the raw URL of the script to mw.loader.load
in your global JavaScript. For example, I load in m:User:Pppery/global.js using mw.loader.load("https://en.wikipedia.org/w/index.php?action=raw&title=User:Pppery/no-ooui-contribs.js&ctype=text/javascript")
.
This post was hidden by Pppery (history)
So what I'm seeing here is that you need the "&action=raw" and "&ctype=text/javascript". Is this how it's done?
Well, that's how I do it at least, and it works for me. If you want a more detailed explanation, you should probably ask at Project:Support desk or w:Wikipedia:Village pump (technical), since this talk page is fairly low traffic and I only noticed your post via recent changes patrol.
The help docs are at Help:Extension:GlobalCssJs. Looking at examples used by other active users is generally the best way to learn. :)