Board Thread:Support Requests - Getting Technical/@comment-4748628-20140729181943

Alright here's a weird one. I want to load several pages from a wiki as a variable, not as a script or as css. I've managed to make it work using the API to pull the contents of the page, but this is slow and lags out the users of the script.

I'm using this for custom colors in Special:Chat. Right now, when someone sets their color in my script, it saves it at Special:MyPage/ChatColor.js (.js ending prevents other users from editing). The script will get a list of all the users, then make an API query that checks their User/ChatColor.js page and reads the color value.

The API query takes a few seconds on slow connections, and it locks up the browser as this happens. I'm hoping there's a better way to do this without using the API. Maybe mw.loader? I know the back end can load just the text of a page because all of the system messages are MediaWiki: pages. I want a behavior similar to that.  