Displaying Members Name (HTML5)

Note: the following only works if the page is on the same domain (including HTTP vs HTTPS) as the login page. This does not work if the page is HTTP and the login page is HTTPS and vice versa.

To display the member's name in any HTML, use the following HTML tag wherever you want the name to appear:

<span class="SFnam"></span>

Then add the following script once at the bottom of the page (if you are using those tags only on specific pages) or in the site footer (if you want to use this tag throughout the site):

<script>(function(){var i,j,a,x;try{x=localStorage.getItem("SF_nam");}catch(e){x="";}try{for(a=document.querySelectorAll(".SFnam"),i=a.length-1;i>=0;i--)a[i].innerHTML=x?x:"";}catch(e){}try{for(a=document.querySelectorAll(".SF_li"),i=a.length-1;i>=0;i--)a[i].style.display=x?"":"none";}catch(e){}try{for(a=document.querySelectorAll(".SF_lo"),i=a.length-1;i>=0;i--)a[i].style.display=x?"none":"";}catch(e){}})();</script>