User:The Master of Hedgehogs/Chocolate

This is the guide of
Chocolate

a multipurpose user script

What is Chocolate?

edit
Chocolate logo (from Twemoji)

Chocolate, formerly known as Melting Chocolate Block is a multipurpose and modular gadget-like user script created by User:Anpang01 and coded in JavaScript/jQuery. It can be used to do some things faster and more.

Chocolate supports MediaWiki 1.37 - 1.41 with the Vector 2010 skin, and maybe also the 2022 version.

Installation

edit

Simply go to your common.js page and add the following code:
importScript("User:The Master of Hedgehogs/Chocolate.js");
Reset your cache, and it should work.

Modules

edit

Wiktionary, Wikiquote, and Wikidata

edit

Adds buttons in the More dropdown that link to the corresponding Wiktionary, Wikiquote, and Wikidata pages, respectively.

ExtraSandbox

edit

Adds a link on the topbar to an extra sandbox, at User:<user>/sandbox2.

Might occasionally be useful.

NoSiteSub and WhatWiki

edit

Removes some unnescessary text - the site subtitle (the "From Wikipedia, the free encyclopedia" text below the page title).

After removing the site sub, you may want to enable WhatWiki for a better way to know what wiki you're on, as the site sub doesn't tell the language of the wiki you're on

NoCopyWarn

edit

Removes the unnescessary copyright warning when editing pages.

LogoutConfirm

edit

Prevents accidental log-outs by adding a confirmation screen. The code was written by Fred Gandt and is credited in the JS.

Other features

edit

Icon

edit

An "icon" is added at the bottom left of the screen, which displays the chocolate logo and the current version.

This feature is on by default - uncheck "Show icon" in Special:ChocolatePreferences to disable this.

ChocolatePreferences

edit

Since user scripts can't edit the normal Special:Preferences as the page is in safe mode, Chocolate preferences go into its own page at Special:ChocolatePreferences.

Version history

edit

This script was created and was maintained by User:Anpang01, and now maintained by User:The Master of Hedgehogs.
Version numbers use a loose version of Semantic Versioning, with each release having 3 numbers.

Version number Release date Notes/Changelog
1.1.2 Prerelease 3 March 2024 Added LogoutConfirm and Wikiquote
1.1.1 16 December 2023 Added ShowPrintFooter
1.1.0 12 December 2023 Revamp and cleanup
1.0.4
1.0.3
15 February 2022 Added some new features and stuff
1.0.2
1.0.1

1.0.0
14 February 2022 Initial release
edit

Source code: Chocolate.js, Chocolate.css

Talk page / Todo list