Wikipedia talk:Scripts++/Issue 4

(Redirected from User talk:DannyS712/SPP 04)
Latest comment: 5 years ago by Evad37 in topic mw.loader.getScript()

New, improved, updated, revamped, etc scripts

edit
Could you put User:Pythoncoder/Scripts/voteSymbols in the next issue please? I added some new stuff. — pythoncoder  (talk | contribs) 03:10, 8 March 2019 (UTC)Reply
@Pythoncoder: Sure, I will. 3 things though: 1 - Its a great script, thanks for making it; 2 - can you update the changelog?; and 3 - you use different files in the script itself and on your "supported symbols" list for "Listify" (pink vs purple) just FYI. Thanks, --DannyS712 (talk) 04:00, 8 March 2019 (UTC)Reply
@DannyS712: 1) you’re welcome, 2) I will update the changelog, 3) the listify problem is because Wikipedia keeps an outdated local version of the Commons file the script uses. I’ve tried to fix this but I couldn’t. — pythoncoder  (talk | contribs) 12:54, 8 March 2019 (UTC)Reply

mw.loader.getScript()

edit

@DannyS712: mw.loader.getScript has been added to mw.loader, see mw:RL/CM#mw.loader.getScript. It loads a script url and returns a jQuery promise, which you can use to specify callbacks. This feature resolved a request phab:T27962 that was made in 2010. - Evad37 [talk] 03:21, 23 March 2019 (UTC)Reply

@Evad37: wow, sure. Can you write a 1 sentence explanation of the significance? --DannyS712 (talk) 03:23, 23 March 2019 (UTC)Reply
mw.loader previously allowed you to load a script by URL with mw.loader.load(), but you couldn't specify callbacks to be executed after that script loaded (or failed to load). Now you can, similar to mw.loader.using(), but with script URLs instead of named modules such as "mediawiki.util". - Evad37 [talk] 03:40, 23 March 2019 (UTC)Reply