[04:37:35] Woah, a wild ^demon appears :) [14:27:46] where do I know what version of Node is used for RESTBase of Wikimedia prod? [14:40:05] Lens0021: node 10 [14:41:41] Is WMF really using node 10 now for RESTBase? It was using 6.17.1 like a year ago [14:47:41] should be, it's on buster now [14:48:35] um, sorry I had to ask for Mathoid [14:48:58] though RESTBase is interesting [14:49:24] (*version of Node RESTBase is on) [14:52:18] Mathoid is running node 10 last time I checked. However, I haven't been able to complete npm install on it recently. There seems to be some broken dependencies. [14:53:23] That seems to be what I've faced [14:54:15] I've given "error commander@9.2.0: The engine "node" is incompatible with this module. Expected version "^12.20.0 || >=14". Got "10.24.1"" [14:55:22] Hopefully, I had an old working install, and I just copied the entire folder to the server [14:57:17] You can be adventurous and try with node 14 [14:58:26] Although it was failing on node 12 when I last checked, a year ago... https://www.mediawiki.org/w/index.php?title=Manual:Mathoid&diff=4537303&oldid=4123754 [14:58:31] Thank you, I will try out 14 or later versions [15:00:33] node services seem to have been abandoned for a long time though they are used in production. [15:00:43] Sad [15:02:18] indeed [17:49:55] MediaWiki needs a native way to inject JS code into a single script statement for scripts that require access to the scope. If I understand correctly, JS script outside of the container are not able to access or interact with the JS code nor get or set anything [17:50:41] I am currently using $out->addScript() [18:50:12] ryzenda: what extension/skin/etc./do you have some code I can take a look at? [19:03:18] ashley, I just prepared a git repo https://github.com/jasonkhanlar/mediawiki-extensions-PhotoSwipe [19:05:17] Als note that I didn't really prepare documentation to explain the idea I had in mind for implementation, but I'll work on that later [19:05:38] PhotoSwipe, eh? ;) wikiHow's using that! (but it's kinda...not a very clean implementation, no) [19:06:06] but first questions first: what's wrong with [[mw:Extension:MultimediaViewer]]? it's used on Wikimedia wikis and a lot of other sites [19:11:48] ashley, I will look at MultimediaViewer again to refresh myself with it, but I think I couldn't use it because on my mediawiki site I have uploads disabled, and am using external hotlinked images and media sources. e.g. typing the URL to an image in wikitext automatically converts it to an element [19:14:45] also, before I stumbled upon PhotoSwipe, I was searching through dozens of JS library gallery scripts besides PhotoSwipe, and trying to find one that I liked, worked as I expected, and had recent developments as well as lots of community following, and that was practically the only one I found so far that matched my criteria [19:15:45] PhotoSwipe appears to be a bit strange too, not exactly my ideal, but when it works, it seems quite fast and efficient for end user, just a bit difficult for developing with [19:23:26] I wonder if Krinkle would have some thoughts on this as the resident JS expert :) [19:24:29] "If I understand correctly, JS script outside of the container are not able to access or interact with the JS code" [19:24:40] To my knowledge and in the way I interpret this - this is incorrect. [19:25:19] The only thing that type=module does is 1) defer execution to DOMContentLoaded, much like wrapping the contents in $(document).ready(function() { ... } ) would, and 2) it enables use of the `import` keyword as a more declarative way of loading other JS files. [19:25:31] It in no way sandboxes or reduces scope or visiblity. [19:27:34] For reasons of performance, correctness (version integrity), and localisation for langauge and skin, MediaWiki has not encouraged the raw and unprocessed loading of code for some time. One shoudl generally register such code with ResourceLoader as a module bundle instead, and load it with $outputPage->addModules() https://www.mediawiki.org/wiki/ResourceLoader [19:28:03] This avoids e.g. mixing incompatible versions of scripts and ensures optimal caching and fragmentation/invalidation of that same cache. [19:28:14] I was looking at addModules quite a bit,however, the PhotoSwipe library is ES6 and requires import statements [19:28:27] and it appears that addModules does not provide a way to inject a