Page MenuHomeMiraheze

Add global gadget UTCLiveClok
Closed, ResolvedPublic


Requesting the global gadget UTCLiveClock be added to Miraheze. Gadget adds a UTC clock to the user's personal toolbar that can be clicked to purge the current page. Link to MediaWiki source:

Event Timeline

AmandaCath added a project: MediaWiki.

There is no method to globally implement a gadget, though there is an absolutely ancient upstream task about doing so (T22153). As I don't see that being implemented any time soon, it's likely the closest you can come is by using the User:Name/global.js page to load in the script globally.

You can add the following to Special:MyPage/global.js on meta:

mw.loader.load("", "text/css");
mw.loader.load("", "text/css");

However, on individual wikis, I would still recommend adding the gadget (when you have the tools to do so). To prevent conflicts with the local gadget and your global.js page, you can wrap the lines in an if statement to prevent it from loading in on certain wikis. For example:

if( !["metawiki", "testwiki"].includes($mw.config.get("wgDBname")) ) {
    mw.loader.load("", "text/css");
    mw.loader.load("", "text/css");

Would prevent the scripts from being run on and, and all you need to do to expand it, is add another wiki's dbname to the array (you can get the dbname by running mw.config.get("wgDBname") in your browser's console window, or just add -wiki to the subdomain).

Reception123 assigned this task to Void.

Per Void's detailed answer, there is nothing more that can be done at a global level except what Void said.