Assume you are loading the LiveAdin using this code:
- Code: Select all
<script language="javascript" type="text/javascript" src="http://www.liveadmin.net/client/liveadmin.php?key=L1ED164CV46B2D6M131A84"></script>
You can replace it with:
- Code: Select all
<script language="javascript" type="text/javascript">
if(navigator.userAgent.indexOf("Safari") != -1)
var LV_ininter=window.setInterval("LV_CheckInit()",100);
else
var LV_ininter=window.setInterval(function(){ LV_CheckInit(); },100);
var LV_TrigCount=0;
function LV_CheckInit()
{
LV_TrigCount++;
if(typeof(document)!='undefined' && typeof(document.getElementsByTagName('head'))!='undefined' && typeof(document.getElementsByTagName('head')[0])!='undefined')
{
window.clearInterval(LV_ininter);
// Replace the site key with your own
var LiveAdminSiteKey = 'L1ED164CV46B2D6M131A84';
// Replace the tag with ID of the span element or leave it as is if span has no ID
var LiveAdminTag = 'liveadmin';
var LV_THost = (("https:" == document.location.protocol) ? "https://www." : "http://www.");
var ss = document.createElement('script');
ss.src = LV_THost+'liveadmin.net/client/liveadmin.php?key='+LiveAdminSiteKey+'&tag='+LiveAdminTag;
var hh = document.getElementsByTagName('head')[0];
hh.appendChild(ss);
}
else
{
if(LV_TrigCount>100)
window.clearInterval(LV_ininter);
}
}
</script>
Here is another code, not as efficient as the first code, but small enough for intermediate web masters:
- Code: Select all
<script language="javascript" type="text/javascript">
// Replace the site key with your own
var LiveAdminSiteKey = 'L1ED164CV46B2D6M131A84';
// Replace the tag with ID of the span element or leave it as is if span has no ID
var LiveAdminTag = 'liveadmin';
var LV_THost = (("https:" == document.location.protocol) ? "https://www." : "http://www.");
document.write(unescape("%3Cscript src='" + LV_THost + "liveadmin.net/client/liveadmin.php%3Fkey%3D" + LiveAdminSiteKey + "%26tag%3D" + LiveAdminTag + "' type='text/javascript'%3E%3C/script%3E"));
</script>
Farhad Malekpour
