Remove IEFixes.js (legacy support for MSIE<=6).
authorEloquence <erik@wikimedia.org>
Wed, 6 Aug 2014 16:05:54 +0000 (17:05 +0100)
committerEloquence <erik@wikimedia.org>
Wed, 6 Aug 2014 16:05:54 +0000 (17:05 +0100)
Since JavaScript is no longer loaded in MSIE6, these compatibility
fixes are no longer required.

Change-Id: Ib2a2be28877911ec20a76c766a49581eda9c5a5f

RELEASE-NOTES-1.24
skins/common/IEFixes.js [deleted file]
skins/common/wikibits.js

index 0125ffe..4238332 100644 (file)
@@ -294,7 +294,9 @@ changes to languages because of Bugzilla reports.
 * Removed global functions wfArrayLookup(), wfArrayMerge(), wfDebugDieBacktrace()
   and wfTime(). (deprecated since 1.22)
 * Microsoft Internet Explorer 6 is now a "grade C" browser, meaning that
-  JavaScript is no longer executed in this browser.
+  JavaScript is no longer executed in this browser. The IEFixes script, which
+  existed purely to provide support for MSIE versions below 7 and which was
+  conditionally loaded for those browsers, was also removed.
 
 ==== Renamed classes ====
 * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression
diff --git a/skins/common/IEFixes.js b/skins/common/IEFixes.js
deleted file mode 100644 (file)
index 545acad..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * IE fixes javascript loaded by wikibits.js for IE <= 6.0
- */
-/*global isMSIE55:true, doneIETransform:true, doneIEAlphaFix:true */
-/*global hookit:true, fixalpha:true */
-( function ( mw, $ ) {
-
-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.showModalDialog && window.clipboardData && window.createPopup );
-doneIETransform = false;
-doneIEAlphaFix = false;
-
-hookit = function () {
-       if ( !doneIETransform && document.getElementById && document.getElementById( 'bodyContent' ) ) {
-               doneIETransform = true;
-               fixalpha();
-       }
-};
-
-if ( document.attachEvent ) {
-       document.attachEvent( 'onreadystatechange', hookit );
-}
-
-// png alpha transparency fixes
-fixalpha = function ( logoId ) {
-       // bg
-       if ( isMSIE55 && !doneIEAlphaFix ) {
-               var bg, imageUrl, linkFix, logoa, logospan, plogo;
-               plogo = document.getElementById( logoId || 'p-logo' );
-               if ( !plogo ) {
-                       return;
-               }
-
-               logoa = plogo.getElementsByTagName('a')[0];
-               if ( !logoa ) {
-                       return;
-               }
-
-               bg = logoa.currentStyle.backgroundImage;
-               imageUrl = bg.substring( 5, bg.length - 2 );
-
-               doneIEAlphaFix = true;
-
-               if ( imageUrl.substr( imageUrl.length - 4 ).toLowerCase() === '.png' ) {
-                       logospan = logoa.appendChild( document.createElement( 'span' ) );
-
-                       logoa.style.backgroundImage = 'none';
-                       logospan.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + imageUrl + ')';
-                       logospan.style.height = '100%';
-                       logospan.style.position = 'absolute';
-                       logospan.style.width = logoa.currentStyle.width;
-                       logospan.style.cursor = 'hand';
-                       // Center image with hack for IE5.5
-                       if ( document.documentElement.dir === 'rtl' ) {
-                               logospan.style.right = '50%';
-                               logospan.style.setExpression( 'marginRight', '"-" + (this.offsetWidth / 2) + "px"' );
-                       } else {
-                               logospan.style.left = '50%';
-                               logospan.style.setExpression( 'marginLeft', '"-" + (this.offsetWidth / 2) + "px"' );
-                       }
-                       logospan.style.top = '50%';
-                       logospan.style.setExpression( 'marginTop', '"-" + (this.offsetHeight / 2) + "px"' );
-
-                       linkFix = logoa.appendChild( logoa.cloneNode() );
-                       linkFix.style.position = 'absolute';
-                       linkFix.style.height = '100%';
-                       linkFix.style.width = '100%';
-               }
-       }
-};
-
-if ( isMSIE55 ) {
-       // ondomready
-       $( fixalpha );
-}
-
-// Expand links for printing
-hasClass = function ( classText, classWanted ) {
-       var i = 0, classArr = classText.split(/\s/);
-       for ( i = 0; i < classArr.length; i++ ) {
-               if ( classArr[i].toLowerCase() === classWanted.toLowerCase() ) {
-                       return true;
-               }
-       }
-       return false;
-};
-
-window.onbeforeprint = function () {
-       var allLinks, contentEl, expandedLink, expandedText, i;
-
-       expandedURLs = [];
-       contentEl = document.getElementById( 'content' );
-
-       if ( contentEl ) {
-               allLinks = contentEl.getElementsByTagName( 'a' );
-
-               for ( i = 0; i < allLinks.length; i++ ) {
-                       if ( hasClass( allLinks[i].className, 'external' ) && !hasClass( allLinks[i].className, 'free' ) ) {
-                               expandedLink = document.createElement( 'span' );
-                               expandedText = document.createTextNode( ' (' + allLinks[i].href + ')' );
-                               expandedLink.appendChild( expandedText );
-                               allLinks[i].parentNode.insertBefore( expandedLink, allLinks[i].nextSibling );
-                               expandedURLs[i] = expandedLink;
-                       }
-               }
-       }
-};
-
-window.onafterprint = function () {
-       for ( var i = 0; i < expandedURLs.length; i++ ) {
-               if ( expandedURLs[i] ) {
-                       expandedURLs[i].removeNode( true );
-               }
-       }
-};
-
-}( mediaWiki, jQuery ) );
index b6689f9..5c6e63b 100644 (file)
@@ -5,7 +5,6 @@
        var msg,
                win = window,
                ua = navigator.userAgent.toLowerCase(),
-               isIE6 = ( /msie ([0-9]{1,}[\.0-9]{0,})/.exec( ua ) && parseFloat( RegExp.$1 ) <= 6.0 ),
                onloadFuncts = [];
 
 /**
@@ -199,8 +198,4 @@ win.importStylesheetURI = function ( url, media ) {
        return l;
 };
 
-if ( isIE6 ) {
-       win.importScriptURI( mw.config.get( 'stylepath' ) + '/common/IEFixes.js' );
-}
-
 }( mediaWiki, jQuery ) );