Adds the username of the registered user viewing the page into the page.

Uses Javascript to replace contents in span with viewing username:

<span class="insertusername">Text_will_be_replace_with_username</span>
<insert name here> is the best. <insert name here>'s userpage is good too.

The user reading will always see a compliment directed toward them and their userpage, no matter who they are.


This template requires you to add the following to your MediaWiki:Common.js:

/* 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;

/* End of the {{USERNAME}} replacement */
Community content is available under CC-BY-SA unless otherwise noted.