User:Dragoniez/ToollinkTweaks
If you have comments, suggestions, bug reports, etc., please leave a comment on the talk page. |
ToollinkTweaks is a global script that adds a functionality to extend toollinks attached to user links, to the script user's liking.
For instance:
- Normal toollinks
- 2023-09-09T15:48:28 Dragoniez (talk | contribs) created page User:Dragoniez/ToollinkTweaks.js (v1.0.0)
- Extended toollinks (configurable)
- 2023-09-09T15:48:28 Dragoniez (talk | contribs | CA | ST | GUC) created page User:Dragoniez/ToollinkTweaks.js (v1.0.0)
Installation
[edit]Add the following to Special:MyPage/global.js for global use, or to Special:MyPage/common.js for use on meta, or to your common.js on your local project. (source code)
mw.loader.load("//meta.wikimedia.org/w/index.php?title=User:Dragoniez/ToollinkTweaks.js&action=raw&ctype=text/javascript");
Configurations
[edit]Config page
[edit]You can configure your toollinks by visiting Special:ToollinkTweaksConfig (or Special:TTC). Find a portlet link to the config page in the toolbox, or type in the page name in the address bar. It is a non-existing special page, but the script will create the config interface when you visit the page, if you have installed the script.
Config options
[edit]The ToollinkTweaks config currently has 9 fields for each toollink.
Option | What to specify | Notes |
---|---|---|
Label (required) | The label of the toollink | |
URL (required) | The URL of the toollink | Available variables:
|
Target | Types of user links to which we add toollinks | User , IP , and/or CIDR (a.k.a. IP range)
|
Tab | The tab to open the toollink on | The current tab or A new tab
|
Special pages (incl.) | The canonical names of special pages on which we add the toollink |
Use |
Special pages (excl.) | The canonical names of special pages on which we don't add the toollink |
Use |
Global | Whether to make the toollink global |
If this option is checked, the toollink is generated on all projects |
Local exception | Whether to set a local exception and disable the toollink |
Visible only when |
Enable | Whether to enable the toollink |
Notes on canonical special page names
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Note that some of the canonical special page names are "disabled" and/or "reinterpreted". In the list below, disabled means that the special page name is gotten rid of from the autocomplete candidates for the relevant toollink options (which is mostly because the special page is redirected to another and unreachable). For instance, Special:Mycontributions is redirected to On the other hand, reinterpreted means that the script reinterprets your location as a given special page. For example, Special:EditPage/Meta:Sandbox redirects you to
|
Showcase
[edit]2023-09-09T15:48:28 Dragoniez (talk | contribs | ST) created page User:Dragoniez/ToollinkTweaks.js (v1.0.0)
Option | Value | Notes |
---|---|---|
Label | ST | |
URL | https://meta3.toolforge.org/stalktoy/$1 | Recognized as https://meta3.toolforge.org/stalktoy/Dragoniez
|
Target | User , IP , CIDR |
Stalk Toy is compatible with all of these |
Tab | The current tab |
|
Special pages (incl.) | * |
|
Special pages (excl.) | ||
Global | Unchecked | |
Local exception | N/A | |
Enable | Checked |
2023-09-09T15:48:28 Dragoniez (talk | contribs | CA) created page User:Dragoniez/ToollinkTweaks.js (v1.0.0)
(Below is an example to generate the toollink except on Special:AbuseLog.)
Option | Value | Notes |
---|---|---|
Label | CA | |
URL | $2Special:CentralAuth/$1 |
Recognized as |
Target | User |
CA is incompatible with IPs |
Tab | The current tab |
|
Special pages (incl.) | * |
|
Special pages (excl.) | AbuseLog |
|
Global | Checked |
The partial URL specification will be important when this option is checked |
Local exception | N/A | |
Enable | Checked |
2023-09-09T15:48:28 Dragoniez (talk | contribs | GUC) created page User:Dragoniez/ToollinkTweaks.js (v1.0.0)
(Below is an example to generate the toollink only on Special:Log and action=history
.)
Option | Value | Notes |
---|---|---|
Label | GUC | |
URL | https://xtools.wmflabs.org/globalcontribs/ipr-$1 | Recognized as https://xtools.wmflabs.org/globalcontribs/ipr-Dragoniez
|
Target | User , IP , CIDR |
|
Tab | The current tab |
|
Special pages (incl.) | Log , PageHistory |
|
Special pages (excl.) | ||
Global | Unchecked | |
Local exception | N/A | |
Enable | Checked |