MediaWiki:Common.js: Difference between revisions
mNo edit summary Tag: Reverted |
Tag: Undo |
||
Line 15: | Line 15: | ||
function preloadUploadDesc() { | function preloadUploadDesc() { | ||
if ( | if (wgPageName.toLowerCase() != 'special:upload' && wgPageName.toLowerCase() != 'special:multipleupload') { | ||
return; | return; | ||
} | } | ||
Line 30: | Line 30: | ||
function UserNameReplace() { | function UserNameReplace() { | ||
if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || | if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || wgUserName == null) return; | ||
$("span.insertusername").html( | $("span.insertusername").html(wgUserName); | ||
} | } | ||
addOnloadHook(UserNameReplace); | addOnloadHook(UserNameReplace); | ||
Line 81: | Line 81: | ||
var timerLink = document.createElement( 'a' ); | var timerLink = document.createElement( 'a' ); | ||
var timerObj = document.createElement( 'li' ); | var timerObj = document.createElement( 'li' ); | ||
timerLink.href = '/wiki/' + | timerLink.href = '/wiki/' + wgPageName + '?action=purge'; | ||
timerLink.title = 'Purge the server cache and update the contents of this page.' | timerLink.title = 'Purge the server cache and update the contents of this page.' | ||
timerObj.id = 'pt-timer'; | timerObj.id = 'pt-timer'; |