MediaWiki:Common.js: Difference between revisions

mNo edit summary
Tag: Reverted
Undo revision 18743 by Schiffy (talk)
Tag: Undo
Line 15: Line 15:


function preloadUploadDesc() {
function preloadUploadDesc() {
if ($wgPageName.toLowerCase() != 'special:upload' && $wgPageName.toLowerCase() != 'special:multipleupload') {
if (wgPageName.toLowerCase() != 'special:upload' && wgPageName.toLowerCase() != 'special:multipleupload') {
return;
return;
}
}
Line 30: Line 30:
   
   
function UserNameReplace() {
function UserNameReplace() {
     if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || $wgUserName == null) return;
     if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || wgUserName == null) return;
     $("span.insertusername").html($wgUserName);
     $("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/' + $wgPageName + '?action=purge';
   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';