-// IE fixes javascript loaded by wikibits.js for IE <= 6.0
+/**
+ * IE fixes javascript loaded by wikibits.js for IE <= 6.0
+ */
+/*global isMSIE55:true, doneIETransform:true, doneIEAlphaFix:true */
+/*global hookit:true, fixalpha:true, relativeforfloats:true, setrelative:true */
( function ( mw, $ ) {
-var doneIEAlphaFix, doneIETransform, expandedURLs, fixalpha, isMSIE55,
- relativeforfloats, setrelative, hasClass;
+var expandedURLs, hasClass;
// Also returns true for IE6, 7, 8, 9 and 10. createPopup is removed in IE11.
// Good thing this is only loaded for IE <= 6 by wikibits.
// Might as well set it to true.
-isMSIE55 = window.isMSIE55 = ( window.showModalDialog && window.clipboardData && window.createPopup );
-doneIETransform = window.doneIETransform = undefined;
-doneIEAlphaFix = window.doneIEAlphaFix = undefined;
+isMSIE55 = ( window.showModalDialog && window.clipboardData && window.createPopup );
+doneIETransform = false;
+doneIEAlphaFix = false;
-window.hookit = function () {
+hookit = function () {
if ( !doneIETransform && document.getElementById && document.getElementById( 'bodyContent' ) ) {
doneIETransform = true;
relativeforfloats();
};
if ( document.attachEvent ) {
- document.attachEvent( 'onreadystatechange', window.hookit );
+ document.attachEvent( 'onreadystatechange', hookit );
}
// png alpha transparency fixes
-fixalpha = window.fixalpha = function ( logoId ) {
+fixalpha = function ( logoId ) {
// bg
if ( isMSIE55 && !doneIEAlphaFix ) {
var bg, imageUrl, linkFix, logoa, logospan, plogo;
}
// fix ie6 disappering float bug
-relativeforfloats = window.relativeforfloats = function () {
+relativeforfloats = function () {
var bc, tables, divs;
bc = document.getElementById( 'bodyContent' );
if ( bc ) {
}
};
-setrelative = window.setrelative = function ( nodes ) {
+setrelative = function ( nodes ) {
var i = 0;
while ( i < nodes.length ) {
if ( ( ( nodes[i].style['float'] && nodes[i].style['float'] !== ( 'none' ) ||
return false;
};
-expandedURLs = window.expandedURLs = undefined;
-
window.onbeforeprint = function () {
var allLinks, contentEl, expandedLink, expandedText, i;