Permanently protected page

MediaWiki:Common.js: Difference between revisions

From Screamer Wiki
Jump to: navigation, search
imported>Sumpy
No edit summary
imported>Sumpy
No edit summary
Line 2: Line 2:
importScriptPage('MediaWiki:Maintenance.js', 'screamers');
importScriptPage('MediaWiki:Maintenance.js', 'screamers');


/* Replaces {{USERNAME}} with the name of the user browsing the page.
/* Replaces {{Username}} with the name of the user browsing the page.
   Requires copying Template:USERNAME. */
   Requires copying Template:Username. */


function UserNameReplace() {
function UserNameReplace() {
Line 11: Line 11:
  addOnloadHook(UserNameReplace);
  addOnloadHook(UserNameReplace);


/* End of the {{USERNAME}} replacement */
/* End of the {{Username}} replacement */

Revision as of 09:35, 2 January 2016

importScriptPage('MediaWiki:ScreamerWarn.js', 'screamers');
importScriptPage('MediaWiki:Maintenance.js', 'screamers');

/* Replaces {{Username}} with the name of the user browsing the page.
   Requires copying Template:Username. */

function UserNameReplace() {
    if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || wgUserName == null) return;
    $("span.insertusername").html(wgUserName);
 }
 addOnloadHook(UserNameReplace);

/* End of the {{Username}} replacement */