Difference between revisions of "MediaWiki:Common.js"

From MoiWiki
Jump to navigationJump to search
(New page: →‎Any JavaScript here will be loaded for all users on every page load.: function getInternetExplorerVersion() { var rv = -1; if (navigator.appName == 'Microsoft Internet Explorer...)
 
Line 16: Line 16:
 
if ( getInternetExplorerVersion() == 8 )
 
if ( getInternetExplorerVersion() == 8 )
 
{
 
{
       p-logo.style.left = '2em';
+
       //p-logo.style.left = '2em';
 
}
 
}

Revision as of 00:11, 17 June 2010

/* Any JavaScript here will be loaded for all users on every page load. */

function getInternetExplorerVersion()
{
   var rv = -1;
   if (navigator.appName == 'Microsoft Internet Explorer')
   {
      var ua = navigator.userAgent;
      var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
      if (re.exec(ua) != null)
         rv = parseFloat( RegExp.$1 );
   }
   return rv;
}

if ( getInternetExplorerVersion() == 8 )
{
      //p-logo.style.left = '2em';
}