MediaWiki talk:Gadgets-definition

From MEpedia, a crowd-sourced encyclopedia of ME and CFS science and history
Jump to: navigation, search



Add switcher -- notjusttired (talk) 21:45, July 2, 2019 (EDT)[new][edit source][reply]

Can you please add the following code to the end of the MediaWiki:Gadgets-definition, it's needed to get the Template:Switcher radio buttons working. As with the previous code, it's copied from Wikipedia so should not be an issue. User:Kmdenmark notjusttired (talk) 21:45, July 2, 2019 (EDT)


* SidebarTranslate[ResourceLoader|type=general]|SidebarTranslate.js|SidebarTranslate.css

I'm a bit confused. I thought the gadget you wanted to install was "Gadget-switcher.js", not "SidebarTranslate.js"?
I'm also curious. Does Wikipedia review gadgets in any way? I thought that Wikipedia did not endorse the gadgets that individual users come up with...
Pyrrhus (talk) 23:19, July 2, 2019 (EDT)
User:Notjusttired Done! Kmdenmark (talk) 17:36, July 3, 2019 (EDT)
Sorry User:Kmdenmark - I copied in the wrong code. Can you delete the sidebar code and use this instead

* switcher[ResourceLoader|default|targets=desktop,mobile]|switcher.js

Thanks notjusttired (talk) 15:49, July 4, 2019 (EDT)

User:Pyrrhus Wikipedia doesn't endorse most of the code there except the MediaWiki software, eg not the Module, Templates or other things. But if it's been added and been in place so long it's unlikely to be problematic. It's basic Javascript and easy enough to read. notjusttired (talk) 15:49, July 4, 2019 (EDT)
User:Notjusttired Done! Kmdenmark (talk) 16:48, July 8, 2019 (EDT)
Thank you User:Kmdenmark, it's working - Template:Switcher/testcases notjusttired (talk) 17:47, July 8, 2019 (EDT)

Add Replace / Replace Text gadget[new][edit source][reply]

Please add the code below (as usual, without the "pre" tags). Purpose: Creating a "Replace" / Replace "All" gadget in the visual editor for replacing text on the page being edited, which would be especially useful for mobile users and for fixing repeated typos. This is work only for the current page being edited. User:Kmdenmark documentation source with typos fixed.

Code to add to the end of the existing Gadgets-definition[new][edit source][reply]


*veReplaceLoader[ResourceLoader|dependencies=ext.visualEditor.viewPageTarget.init]|veReplaceLoader.js
*veReplace[ResourceLoader|rights=hidden|hidden|dependencies=ext.visualEditor.core]|veReplace.js

Pages used by this gadget[new][edit source][reply]