ScrollUpButton

From Support Wiki
Jump to navigation Jump to search

scrollUpButton is a gadget for wikis. It provides an icon that users can click to scroll back to the top of the page.

Installation instructions

  1. You need to be a local/community admin on your wiki to follow these steps, since it involves editing pages in the MediaWiki namespace.
  2. Copy the contents of MediaWiki:Gadget-scrollUpButton to your wiki. This is the translation string that will display when people look at information about the gadget, so you can modify it if needed.
  3. Copy the source code to your wiki. This includes the contents of the following pages:
  4. At MediaWiki:Gadgets-definition on your wiki, APPEND ONE of the following three options, depending on what config option you want.
    • * scrollUpButton[ResourceLoader|default|hidden]|scrollUpButton.js = it's available to everyone with no opt-out ability
    • * scrollUpButton[ResourceLoader|default]|scrollUpButton.js = it's available to everyone but you can opt out in your user page
    • * scrollUpButton[ResourceLoader]|scrollUpButton.js = by default it's not turned on, but you can turn it on in settings
  5. You may have to wait somewhere between 5 and 15 minutes at this time for server-side cache to update.
  6. Done! Make sure you cache refresh on your browser (Ctrl+F5) on the upload page to see changes.

To change the image of the button, you may upload a 45x45px image on your wiki and replace both //upload.wikimedia.org/wikipedia/commons/thumb/5/59/Font_Awesome_5_regular_arrow-circle-up_blue.svg in your MediaWiki:Gadget-scrollUpButton.js file. You will need to cache refresh locally to see changes, and changes to gadgets may take some time to be processed by server cache.