Jump to content

User:GhostInTheMachine/common

From Wikipedia, the free encyclopedia

GhostInTheMachineTalkAllHelpMiscModulesOtherLayoutPhotosProjectsScriptsTidyingTidyingSDTODOUBXWIP2024-07-12 09:16:32

common.js and common.css are loaded by the system for all skins.

  • common.js — contains configuration values and the code to load all of the other scripts. It does no "work" itself, just loads all of the other scripts.
  • common.css — In my case, common.css contains no CSS at all. All of the CSS that I need is loaded by the JS script that needs it.

Notes

[edit]

This script is written to be loaded by my account on the other WikiMedia wikis that I use.

On other wikis, common.js only contains

mw.loader.load('//wiki.riteme.site/wiki/User:GhostInTheMachine/common.js?action=raw&ctype=text/javascript');

This script includes a system for selecting which other scripts should be loaded on the different wikis. A configuration array contains strings like

"|en|media|commons|meta| GhostInTheMachine/UI",

This means — load my UI script on the wikis that return one of the four listed IDs. The ID is obtained by fetching wgWikiID and removing any "wiki" – just to make the ID smaller.

Possible (modified) wiki ID
"ID" Which wiki? What is it?
en English Wikipedia This wiki
media MediaWiki The wiki software
commons Wikimedia Commons Media repository
meta Meta-Wiki Wikimedia Foundation projects

Where it is not appropriate to use a specific script or the wiki does not support it, the ID value is replaced with a matching number of dashes (just to keep the list tidy).

Users scripts from other people that I use

[edit]
Options set for "standard" gadgets — enabled in Preferences
Gadget Settings Value Details
HotCat hotcat_use_category_links true Enable "Easy categorizing to child or parent categories"
UTCLiveClock LiveClockTimeZone "Europe/London" Display the live time using local UK time — See Time zones
Comments in Local Time twentyFourHours true Display all timestamps using the 24 hour format
User:SD0001/W-Ping WPing_Quick_Durations "-1d / 1d / 2d / 3d / 1w / 2w / 3w / 1m" drop the longer intervals, -1d ~= Now
External scripts
Script Summary Note
User:SD0001/Making user scripts load faster As of 2023-09-29, I am using SD0001's faster load code. Not a user script, has to be at the start of common.js. Works wonders
User:Anomie/linkclassifier Colour code wiki links Really helps
Wikipedia:AutoEd Collection of "standard" edits Early days ...
User:Bradv/Scripts/Superlinks Adds a menu with an assortment of pop-up quick views
User:BrandonXLF/FloatSide Loaded by TalkHelper
User:DemonDays64/Scripts/Dumb_quotes Fix curly quotes Operates in the editor. Now duplicated by AutoEd
User:Evad37/ToDoLister Manage a TODO list in my TODO subpage Stores in a user sub-page, so public
User:Nardog/CatChangesViewer Track additions and removals of a category
User:PerfektesChaos/js/lintHint Adds a button to run a lint check on a page I do use it sometimes
User:PrimeHunter/Source_links.js Adds "Source links" below "What links here" in the sidebar
Wikipedia:RedWarn Counter-vandalism tool. Need to load it myself Use it every day
User:SD0001/shortdescs-in-category Adds a button to the category listings to display all of the short descriptions Use it every day
User:SD0001/W-Ping Adds reminders to display at the top of watchlists. Best todo list Stores in WP user profile, so does not create edits like the Evad37 script
User:Taavi/Aligner Align all equal signs in infoboxe templates Simple, but so awesome
User:Uglemat/RefMan Display all of the refs in a toolbox Operates in the editor
Options set after the scripts have loaded
For Settings Value Details
User:Evad37/ToDoLister todo_subpage "TODO" Use /TODO to store my To Do list instead of /todo
Wikipedia:AutoEd autoEdClick false if I used wikEd — not needed

Users scripts from other people that I previously used

[edit]

My scripts

[edit]

See my Scripts page