From Wikipedia, the free encyclopedia
Jump to: navigation, search
Keφr's Unclutter.png
Author Keφr
Status Semi-stable
Updated 2013-09-22
Browser support
  • Developed on Chromium
Skin support
  • Tested mostly on Vector
  • No issues noticed on Modern and Monobook

Unclutter helps in freeing Wikipedia from distractions. It does so by hiding some of the editing hints, warnings, never-to-be-used helpers, policy reminders on talk pages and other unnecessary verbosity. It also adds hiding links to discussion headers and editnotices, wraps and minimises user signatures.

Warning: Enabling the stylesheet installed by Unclutter is not recommended for inexperienced editors, who might find the advice hidden by this script to be occasionally useful. Specifically, hiding messages reminding you of Wikipedia policies does NOT exempt you from these policies. New users may wish to install Unclutter with the stylesheet disabled by default, see the configuration section below.


Copy the following line into your common.js:

window.kephirUnclutter = { /* configuration */ };
importScript('User:Kephir/gadgets/unclutter.js'); // [[User:Kephir/gadgets/unclutter]]

You may want to insert configuration options before importing the script; again, see the configuration section.

The CSS stylesheet will be pulled automatically from the page User:Kephir/gadgets/unclutter.css.

Non-Wikipedia installs[edit]

To install the script outside of Wikipedia, use this line instead of importScript:


Wikipedia-specific settings will not be activated. The CSS stylesheet will be pulled from the page User:Kephir/gadgets/unclutter.css on the local wiki, not from Wikipedia. Currently, only the English Wiktionary has a customised stylesheet; other wikis will have an empty sheet imported, which has no effect. Leave a note on the talk page if you want a stylesheet for your wiki.

Note: Unclutter is tested mostly on Wikipedia, which means it expects to run on a fairly recent version of MediaWiki. Compare Wikipedia's Special:Version page to your own wiki's before reporting problems.

Templates and interface affected[edit]

Items marked "heuristic" may be potentially incomplete or affect unexpected places, although the selectors have been chosen to be as specific as possible.

By the stylesheet[edit]

  • Copyright and policy warnings and reminders in the old editor — hidden
  • JavaScript, CSS, category and file editnotices — hidden
  • Instructions how to WP:BYPASS browser caches on JavaScript and CSS pages — hidden
  • {{talk header}} — notice hidden; archive box kept
  • {{calm}} — hidden
  • {{off topic warning}} — hidden
  • {{controversial}} — hidden
  • {{not a forum}} — hidden
  • {{db-meta}} — trimmed down
  • {{proposed deletion/dated}} — trimmed down
  • Overly fancy user talk pages — restored default styles (heuristic)
  • Welcome templates — trimmed down (heuristic)
  • Twinkle preferences notice — hidden

By JavaScript[edit]

  • Editnotices and editintros — made collapsible
  • Category and template list in the old editor — made collapsible, hidden by default
  • Discussions on talk pages and other discussion pages — made collapsible
  • Signatures — minimised

Importing the script will also add a "Toggle Unclutter" item to the toolbox. Clicking it will change whether the stylesheet affects the page.

Signature minimisation[edit]

Custom-styled Unclutter and Comments in Local Time reformatting signatures and timestamps in a Wikipedia discussion.

By default, Unclutter scans non-special non-article pages for timestamped signatures, wraps them up and replaces with a text of the form:

Example (annotation) (talkcontribactionslogsig)

The last link will show the original signature. In the section below, you can learn how to change the default behaviour; instead of completely hiding customised signatures, you might want to apply styles to specific users or groups (i.e. IP editors). Unclutter wraps signatures inside a span element and attaches CSS classes to them to allow this. When signature minimisation is disabled, this is the only thing Unclutter does.

Attached to the minimised signature.
Attached to the original signature.
Attached to both of the above.
Attached to signify whose signature it is. When referring to this class, some special characters may need to be escaped according to the CSS escaping rules.
Attached to signatures of editors identified by an IPv4 address.
Attached to signatures of editors identified by an IPv6 address.
Attached to all signatures of unregistered editors.

The following classes are used in the minimised signature:

The initial em-dash (—).
The user's name.
The username annotation, if any.
The talk page link.
The contributions page link.
The user's act link (for actions performed by this user).
The user's log link (for actions performed on this user).
The "sig" link.

For example, to hide the log link, add this to your stylesheet:

.kephir-unclutter-minisig .log-link {
	display: none;


To configure Unclutter, add the following code before importing the script:

window.kephirUnclutter = {
	enableOnPageLoad            : true,
	wrapDiscussions             : true,
	collapseDiscussionsByDefault: false,
	signaturesProcess           : true,
	signaturesMinimise          : true,
	signaturesColourise         : true,
	signaturesExceptions        : [],
	userAnnotations             : { /* "username": "annotation" pairs, separated by commas */ },
	processSig                  : function (context) { return false; },
	postProcessSig              : function (context) { return false; }

To set options, change values to the right of the colon. The values listed here are the defaults. Any line in the above code may be omitted, except for the first and the last. The last item should not end with a comma; this is a syntax error and will prevent the script from executing.

Whether to enable the stylesheet on page load. Inexperienced users should set this to false, otherwise nasty things may happen. At worst, a visit to Administrators' noticeboards. You have been warned.
Whether to wrap discussions inside divs to make them collapsible. Disabling this might improve performance slightly, if you do not use this feature.
Whether previously unseen discussions should be collapsed or expanded by default. Previously seen discussions are left in the state they were last seen; HTML5 localStorage is used to remember it.
Determines whether to scan pages for signatures to process. Articles and special pages are never scanned. Only timestamped signatures are recognised, as non-timestamped signatures are too difficult to identify.
Determines whether to minimise found signatures.
Determines whether Unclutter will set different background colours for signatures of different users.
An array of names of users whose signatures are exempted from minimisation. Usernames should be written inside single or double quotes, separated by commas, like this: ["Example", 'Undefined']
A braced list of username: annotation pairs, both enclosed within double or single quotes, separated by commas. The signature minimiser will attach the appropriate annotation to the username specified. For example: { "קיפודנחש": 'kipod' } (past default).
A JavaScript function which is called before minimisation and may return true to prevent Unclutter from performing it. The context is an object containing various information like the username, the DOM node of the minimised signature, etc. See the source code for details.
A JavaScript function which is called after minimisation. context is the same as above.