Jump to content

User talk:Reinischmax

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

JS changes

[edit]

Hi, I made some changes to the way the code is loaded, which should make it more effecient to load on every single page. The big change here is to not wait for the entire dom to finish loading, before starting to run the rest of the code. Another change I made, was to parallize some of the load fase, by using $.when. The same can be done with the initial http call, but as that would change the structure more aggressively, I will have to test that a bit better.

I noticed also that you are using some es6 and es2016 and es2017 language features like let and arrow functions. Note that Wikimedia is still es5 compatible and thus for wider deployment, scripts should be es5 compatible as well, to avoid browser errors. If you do want to use such features, I advise hosting in a git repo and using something like typescript, babel to transpile to es5 compatible code. —TheDJ (talkcontribs) 10:03, 18 December 2018 (UTC)[reply]

TheDJ, Thanks a lot! For now I'll just change the code to be es5 compatible, but if I were to host a git repo, would I be able to use my own IDE? I've just been using the native wikipedia code editor but I would very much prefer to use a separate application. If that is the case, then I might try following the steps you mentioned. Reinischmax (talk) 19:43, 18 December 2018 (UTC)[reply]

IABooks script

[edit]

Hi Reinischmax! I like the script a lot. Would you mind if I made a couple of changes regarding jQuery usage and load efficiency? (Specifically, use of the addClass and css functions, and loading the archive.org API call in parallel with the ResourceLoader module? Thanks! Enterprisey (talk!) 21:51, 29 January 2019 (UTC)[reply]

Enterprisey, sure, just bear in mind that the CSS will be split out if/when it's turned into a gadget. —CYBERPOWER (Chat) 21:55, 29 January 2019 (UTC)[reply]
Enterprisey, let me know what you want to push to the page, and I'll push it for you. Also your reply script isn't working on my talk page again. :-) —CYBERPOWER (Chat) 22:03, 29 January 2019 (UTC)[reply]
Sure, will do. (Or something. ) I'll look into your talk page, although initial Parsoid experiments weren't promising, so it might take a bit of time. Enterprisey (talk!) 22:25, 29 January 2019 (UTC)[reply]