Jump to content

User:Anpang/Chocolate

From Wikipedia, the free encyclopedia



Old content

This is the guide of

Chocolate

a multipurpose user script

What is Chocolate?

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

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

Modules

Wiktionary and Wikidata

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

ExtraSandbox

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

Might occasionally be useful.

NoSiteSub and WhatWiki

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

Removes the unnescessary copyright warning when editing pages.

Other features

Icon

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

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

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

Version number Release date Notes/Changelog
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

Source code: Chocolate.js, Chocolate.css

Talk page / Todo list