CodeQuickLinks creates a rail module with quick links to the user's local JavaScript and CSS files, the user's Community Central global JS and CSS files, the wiki's MediaWiki pages, and Special:JSPages.
Installation
Configuration
Rather than use the default links set, users may incorporate a link set of their own or add additional links to the default set via the inclusion of a window.customCodeQuickLinks object placed prior to the script's import.
The boolean replaceAllDefaultLinks field, by default set to false, allows users to display only their custom link selection without any of the defaults if set to true.
The showIcon boolean, set to true by default, allows for the display of a WDS-style icon beside the module title, similar to the design of the modernized rail modules.
The linkSet object contains the properly-formatted links for inclusion.
An example is displayed below:
window.customCodeQuickLinks= {
replaceAllDefaultLinks: true,
showIcon: false,
linkSet: {
siteFiles: [
{
name: "JSPages",
href: mw.util.getUrl("Special:JSPages")
},
{
name: "ImportJS",
href: mw.util.getUrl("MediaWiki:ImportJS")
}
],
userFiles: [
{
name: "Global.js",
href: "//c.fandom.com/wiki/Special:MyPage/global.js"
},
{
name: "Global.css",
href: "//c.fandom.com/wiki/Special:MyPage/global.css"
}
]
}
};
Localization note
Your preferred language cannot be changed locally. This is because it depends on the wiki's content language. For example, German Community Central's language is German and English Community Central's language is English.
Changelog
| Date | Description |
|---|---|
| November 17, 2016 | Initial revision. |
| December 23, 2016 | Multiple instances check |
| March 5, 2017 | General rewrite; addition of ImportJS. |
| October 10, 2017 | Rewrite, addition of MonoBook support. |
| October 19, 2017 | CSS adjustments, removal of .module class, compatibility with ConsistentModules.
|
| April 18, 2018 | Addition of custom links option. |
| April 20, 2018 | Addition of extra add-on links option. |
| June 20, 2018 | Code streamline, CSS ported to separate stylesheet at MediaWiki:CodeQuickLinks.css |
| July 12, 2020 | Addition of UCP support, rewrite of rail module construction functionality, general cleanup. |
| July 14, 2020 | Addition of optional WDS-style icon, using code provided by Ursuul in a thread over two years prior. |
| October 7, 2021 | Final UCP update; removal of legacy MW 1.19 code, refactoring of external dependency loader |