Hello,
I'm Côme (Skylsmoi) and I am working with Kelson (from Kiwix) on the
mwoffliner.
I am trying to mirror locally every js and css resources from original
articles for an offline use.
I have been looking for every resources I could find and currently I manage
to get :
- the ones from api.php?action=parse&prop=modules|jsconfigvars
- the list in the <script> tag from article's <head> listed by
mw.loader.load([...])
- I added startup.js, jquery.js and mediawiki.j
But I have realised that some resources are doing a mw.loader.using() which
download more resources (that might also download even more resources) and
even execute some js code in .using() callbacks.
I can't parse every resources looking for mw.loader.using to manually get
the file because some are dynamic (mw.loader.using(module_list); //
module_list is assigned before in the code)
The callbacks also are a problem for parsing the files because in offline,
the files would already be linked to the page, not downloaded so the
callback would not trigger
I'm looking for any help.
The dream solution would an api endpoint that, giving one wikipedia page,
list every js and css modules with, for every js modules, it's dependencies
and the js to execute once downloaded.
Thanks in advance