Difference between revisions of "MediaWiki:Common.js"
From MoiWiki
Jump to navigationJump to searchLine 15: | Line 15: | ||
{ | { | ||
var sheet = document.createStyleSheet(); | var sheet = document.createStyleSheet(); | ||
− | |||
− | |||
sheet.addRule( '#p-logo', 'left:0px;' ); | sheet.addRule( '#p-logo', 'left:0px;' ); | ||
} | } |
Revision as of 00:21, 17 June 2010
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 ) { var sheet = document.createStyleSheet(); sheet.addRule( '#p-logo', 'left:0px;' ); }