Help:Gadgets: Difference between revisions

From Inkipedia, the Splatoon wiki
(Gadgets help)
 
No edit summary
Line 6: Line 6:
# Create a new page for your gadget's JavaScript code at MediaWiki:Gadget-''MyCoolGadget''.js.
# Create a new page for your gadget's JavaScript code at MediaWiki:Gadget-''MyCoolGadget''.js.
#* If you already have JS code, e.g. splitting out from All or common, paste into the new page.
#* If you already have JS code, e.g. splitting out from All or common, paste into the new page.
# Enable the Gadget by default
# Create a new page for your gadget's description shown in preferences at MediaWiki:Gadget-''MyCoolGadget''. (Note the missing .js).
# Save and Test. Remember to clear your browser cache or perform a hard refresh to see the changes.
# Save and Test. Remember to clear your browser cache or perform a hard refresh to see the changes.


== See also ==
== See also ==
* [https://www.mediawiki.org/wiki/ResourceLoader ResourceLoader manual]
* [https://www.mediawiki.org/wiki/ResourceLoader ResourceLoader manual]

Revision as of 21:11, 14 June 2024

Creating new gadgets

  1. Go to MediaWiki:Gadgets-definition.
  2. Add a new entry for your gadget. For example: * MyCoolGadget[ResourceLoader|default]|MyCoolGadget.js
    • This entry creates a new gadget named "MyCoolGadget" and specifies that it should be loaded by default using ResourceLoader.
    • Adding the default keyword in the definition entry enables by default for all users.
  3. Create a new page for your gadget's JavaScript code at MediaWiki:Gadget-MyCoolGadget.js.
    • If you already have JS code, e.g. splitting out from All or common, paste into the new page.
  4. Create a new page for your gadget's description shown in preferences at MediaWiki:Gadget-MyCoolGadget. (Note the missing .js).
  5. Save and Test. Remember to clear your browser cache or perform a hard refresh to see the changes.

See also