Jump to content

User:Chlod/Scripts/GlobalUserToolbox

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Frostly (talk | contribs) at 04:14, 27 September 2021 (Changing short description from "userscript that adds a user toolbox to all user pages" to "Userscript that adds a user toolbox to all user pages" (Shortdesc helper)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
GlobalUserToolbox
Author(s)Chlod
StatusStable
UpdatedFebruary 8, 2020; 5 years ago (2020-02-08)
BrowsersFirefox (but likely works on all browsers)
SkinsVector
SourceUser:Chlod/Scripts/GlobalUserToolbox.js

Global User Toolbox (GUT) is a script that adds the {{User toolbox}} template to all pages in the "User" and "User talk" namespaces.

Installation

English Wikipedia

Edit Special:MyPage/common.js or Special:MyPage/skin.js and append this to your scripts page:

importScript("User:Chlod/Scripts/GlobalUserToolbox.js");

Other Wikipedia Languages

Add this to the common.js file of your account on that wiki:

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Chlod/Scripts/GlobalUserToolbox.js&action=raw&ctype=text/javascript');

Features

The following options can be configured. You can change them by setting a variable named "gutOptions" to an object with the configuration keys you want.

Key Type Default Description
include_userpages boolean (true/false) true Include all pages (excluding subpages) under the "User" namespace.
include_talkpages boolean (true/false) true Include all pages (excluding subpages) under the "User talk" namespace.
include_subpages boolean (true/false) true Include all pages (including subpages) under the "User" namespace.
include_talksubpages boolean (true/false) true Include all pages (including subpages) under the "User talk" namespace.
insert_at_top boolean (true/false) true Insert the user toolbox at the top of the page? (Inserted at bottom, if false.)
ignore_existing boolean (true/false) true Disable adding a toolbox if there is already a toolbox for that user on the page.
start_collapsed boolean (true/false) true Create the toolbox collapsed (if collapsible.)

These settings can be applied like so:

// The variable name must ALWAYS be gutOptions.
var gutOptions = {
    "insert_at_top": false,
    "ignore_existing": false
};
importScript("User:Chlod/Scripts/GlobalUserToolbox.js");

Source

The source can be found at User:Chlod/Scripts/GlobalUserToolbox.js. Like all Wikipedia pages, the license is CC BY-SA 3.0.

Discussion

You may visit my talk page if you have any concerns. You may also discuss this script specifically using this page's talk page.