User:S charette/monobook.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
The accompanying .css page for this skin is at User:S charette/monobook.css. |
/*
// Add time to your monobook "personal menu" list at the very top of the page.
// Created by [[User:Mathwiz2020]]
//
// Indicate where you would like the time to appear:
// pt-userpage, pt-mytalk, pt-preferences,
// pt-watchlist, pt-mycontris, pt-logout
//
gsTimeInsertBefore = ''; // leave blank to append after "logout"
//
function makeTime()
{
var li = document.createElement( 'li' );
li.id = 'pt-time';
var mySpan = document.createElement( 'span' );
mySpan.appendChild( document.createTextNode( '00:00:00' ) );
li.appendChild( mySpan );
if ( ! gsTimeInsertBefore ) { // append to end (right) of list
document.getElementById( 'pt-logout' ).parentNode.appendChild( li );
}
else {
var before = document.getElementById( gsTimeInsertBefore );
before.appendChild( li, before );
}
doTime = window.setTimeout("getTime()", 1000);
}
addOnloadHook( makeTime );
function getTime()
{
var time = new Date();
var hours = time.getUTCHours();
if (hours < 10) { hours = "0" + hours; }
var minutes = time.getUTCMinutes();
if (minutes < 10) { minutes = "0" + minutes; }
var seconds = time.getUTCSeconds();
if (seconds < 10) { seconds = "0" + seconds; }
var currentTime = hours + ":" + minutes + ":" + seconds;
document.getElementById('pt-time').childNodes[0].childNodes[0].replaceData(0, 8, currentTime);
doTime = window.setTimeout("getTime()", 1000);
}
*/
// [[User:Lupin/popups.js]]
mw.loader.load(
'https://wiki.riteme.site/w/index.php?title=User:Lupin/popups.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s');
importScript('User:AzaToth/morebits.js');
importScript('User:AWeenieMan/furme.js');