User:Magog the Ogre 2/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 can be added at User:Magog the Ogre 2/monobook.css. |
importScript('User:Lupin/recent2.js');
importScript("User:AzaToth/twinkle.js");
importScript("User:Tim Song/afchelper4.js");
importScript('User:AWeenieMan/furme.js');
importScript('User:Mr.Z-man/refToolbar.js');
importScript("User:MGA73/nowcommonsreview.js");
/***************************************************************
* added from MediaWiki:Gadget-UTCLiveClock.js *
**************************************************************/
function liveClock()
{
appendCSS( "#utcdate a { font-weight:bolder; font-size:120%; }" );
if (typeof(UTCLiveClockConfig)=='undefined') UTCLiveClockConfig = {};
var portletId = UTCLiveClockConfig.portletId || 'p-personal';
var nextNode = UTCLiveClockConfig.nextNodeId ? document.getElementById(UTCLiveClockConfig.nextNodeId) : undefined;
liveClock.node = mw.util.addPortletLink( portletId, wgScript + '?title=' + encodeURIComponent(mw.config.get('wgPageName')) + '&action=purge', '', 'utcdate', undefined, undefined, nextNode );
if( !liveClock.node ) return;
showTime();
}
$(liveClock)
function showTime()
{
var dateNode = liveClock.node;
if( !dateNode ) return;
var now = new Date();
var hh = now.getUTCHours();
var mm = now.getUTCMinutes();
var ss = now.getUTCSeconds();
var time = ( hh < 10 ? '0' + hh : hh ) + ':' + ( mm < 10 ? '0' + mm : mm ) + ':' + ( ss < 10 ? '0' + ss : ss );
dateNode.firstChild.replaceChild( document.createTextNode( time ), dateNode.firstChild.firstChild );
window.setTimeout(showTime, 1000);
}
/***************************************************************
* added from MediaWiki:Gadget-LongEditSummaries.js *
**************************************************************/
$(function() {
var wpSummary = document.getElementById("wpSummary")
if (wpSummary) {
var adjustMaxLength = function () {
// subtract the number of UTF-8 continuation bytes (0x80-0xBF) from the maxlength
var maxLength = 250 - encodeURI(wpSummary.value).split(/%[89AB]/i).length + 1
wpSummary.maxLength = maxLength
// the last character or group might've pushed us over; if so, inform the user
var errorMessage = document.getElementById("editSummaryTooLong")
if (wpSummary.value.length > maxLength) {
if (!errorMessage) {
wpSummary.style.border = "3px solid red"
document.getElementById("wpSave").disabled = true
var editSummaryTooLong = document.createElement("div")
editSummaryTooLong.id = "editSummaryTooLong"
editSummaryTooLong.style.color = "red"
editSummaryTooLong.style.fontWeight = "bold"
editSummaryTooLong.appendChild(document.createTextNode("Your edit summary is too long."))
var wpMinoredit = document.getElementById("wpMinoredit")
wpMinoredit.parentNode.insertBefore(editSummaryTooLong, wpMinoredit)
}
} else {
if (errorMessage) {
wpSummary.style.border = ""
document.getElementById("wpSave").disabled = false
errorMessage.parentNode.removeChild(errorMessage)
}
}
oldValue = wpSummary.value
}
addHandler(wpSummary, "keyup", adjustMaxLength)
addHandler(wpSummary, "change", adjustMaxLength)
adjustMaxLength()
}
})
/***************************************************************
* added from MediaWiki:Gadget-edittop.js *
**************************************************************/
// Imported from [[User:Alex Smotrov/edittop.js]], version as of: 2007-06-19T04:28:52
// Updated from [[User:TheDJ/Gadget-edittop.js]], version as of: 2009-04-28T11:54:22
if ((wgAction == 'view' || wgAction == 'purge') && wgNamespaceNumber >=0)
addOnloadHook(function edittop_hook(){
var localtitles = {
cs: 'Editovat úvodní sekci',
en: 'Edit lead section',
fr: 'Modifier le résumé introductif',
ko: '도입부를 편집',
it: 'Modifica della sezione iniziale',
ja: '導入部を編集'
};
var our_content = document.getElementById('content') || document.getElementById('mw_content') || document.body;
var editspans = getElementsByClassName( our_content, "span", "editsection");
var span1;
for( es_count = 0; editspans && es_count < editspans.length; es_count++ )
{
span1 = editspans[es_count];
if( span1.className.indexOf( "plainlinks" ) == -1 )
break;
}
if (!span1) return;
var span0 = span1.cloneNode(true);
var editwidth = span1.offsetWidth;
if( skin != "vector" ) editwidth += 10;
var topicons = getElementsByClassName( our_content, 'div', "topicon" );
for( el=0; topicons && el < topicons.length; el++ )
{
topicons[el].style.marginRight = editwidth+"px";
}
var mwfrtag = document.getElementById( "mw-fr-revisiontag" );
if( mwfrtag ) {
mwfrtag.style.marginRight = editwidth+"px";
}
our_content = document.getElementById('mw_header') || document.getElementById('content') || document.body;
var parent = our_content.getElementsByTagName('H1')[0];
parent.insertBefore(span0, parent.firstChild);
var a = span0.getElementsByTagName('A')[0];
if (a.href.indexOf('§ion=T') == -1){
a.title = a.title.replace(/(: |:).*$/,'$1'+'0')
a.setAttribute('href', a.getAttribute('href',2).replace(/§ion=\d+/,'§ion=0'));
}else{//transcluded
a.title = localtitles['en']
a.setAttribute('href', wgScript+'?title='+encodeURIComponent(mw.config.get('wgPageName'))+'&action=edit§ion=0')
}
if (localtitles[wgUserLanguage]) a.title = localtitles[wgUserLanguage]
})
/***************************************************************
* added from MediaWiki:Gadget-Friendly.js *
**************************************************************/
if ( navigator.appName != "Microsoft Internet Explorer" ) //Doesn't work in IE.
{
if ( typeof( FriendlyConfig ) == 'undefined' ) FriendlyConfig = {};
FriendlyConfig.enableClock = false;
importScript("User:Ioeth/friendly.js");
}