MediaWiki talk:Common.js

From JoCopedia
Revision as of 15:10, 27 May 2008 by Agent Lex (talk | contribs)
Jump to navigation Jump to search

A request for comment has been made for this page. Please add your thoughts!


I would like to have the following code added please, I don't have access:

function userNameReplace() {
if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || wgUserName == null) return;
   for(var i=0; userName = document.getElementsByTagName("span")[i]; i++) {
       if ((document.getElementById('pt-userpage'))&&(UserName.getAttribute('class') == "insertusername")) {
           userName.innerHTML = wgUserName;
       }
   }
}
addOnloadHook(userNameReplace);

It allows the Template:Title to work which can then be used to change the title which displays on a page. ~ Percephene ~ talk contribs 02:02, 27 May 2008

I'll trust you on this. Not that I know what need we'd have to replace a page's title, but... --Lex (talk - contribs) 15:10, 27 May 2008 (EDT)