https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112122

Revision: 112122
Author:   jdlrobson
Date:     2012-02-22 17:41:56 +0000 (Wed, 22 Feb 2012)
Log Message:
-----------
do not run javascript on any browser < IE 10

currently the mobile site breaks on various versions of
Internet Explorer. This is due to lack of support of things
such as addEventListener, getElementsByClassName, document.querySelector
and XMLHttpRequest

It is feasible that certain people in low bandwidth countries may be using
legacy browsers to access the mobile site of mediawiki instances. We shouldn't
break the site for these people and at least give them a non-javascript version 
in
the meantime and fix this as demand requires.

Modified Paths:
--------------
    trunk/extensions/MobileFrontend/javascripts/application.js
    trunk/extensions/MobileFrontend/javascripts/beta_application.js
    trunk/extensions/MobileFrontend/templates/ApplicationTemplate.php

Modified: trunk/extensions/MobileFrontend/javascripts/application.js
===================================================================
--- trunk/extensions/MobileFrontend/javascripts/application.js  2012-02-22 
17:34:05 UTC (rev 112121)
+++ trunk/extensions/MobileFrontend/javascripts/application.js  2012-02-22 
17:41:56 UTC (rev 112122)
@@ -200,11 +200,7 @@
                }
 
                function bind( type, handler ) {
-                       if ( el.addEventListener ) { // standardised browser
-                               el.addEventListener( type, handler, false );
-                       } else if( el.attachEvent ) {
-                               el.attachEvent( 'on' + type, handler );
-                       }
+                       el.addEventListener( type, handler, false );
                }
                return {
                        addClass: addClass,

Modified: trunk/extensions/MobileFrontend/javascripts/beta_application.js
===================================================================
--- trunk/extensions/MobileFrontend/javascripts/beta_application.js     
2012-02-22 17:34:05 UTC (rev 112121)
+++ trunk/extensions/MobileFrontend/javascripts/beta_application.js     
2012-02-22 17:41:56 UTC (rev 112122)
@@ -212,11 +212,7 @@
                }
 
                function bind( type, handler ) {
-                       if ( el.addEventListener ) { // standardised browser
-                               el.addEventListener( type, handler, false );
-                       } else if( el.attachEvent ) {
-                               el.attachEvent( 'on' + type, handler );
-                       }
+                       el.addEventListener( type, handler, false );
                }
                return {
                        addClass: addClass,

Modified: trunk/extensions/MobileFrontend/templates/ApplicationTemplate.php
===================================================================
--- trunk/extensions/MobileFrontend/templates/ApplicationTemplate.php   
2012-02-22 17:34:05 UTC (rev 112121)
+++ trunk/extensions/MobileFrontend/templates/ApplicationTemplate.php   
2012-02-22 17:41:56 UTC (rev 112122)
@@ -71,9 +71,11 @@
                        {$this->data['contentHtml']}
                        </div>
                        {$this->data['footerHtml']}
+                       <!--[if gt IE 9]><!-->
                         
{$startScriptTag}{$javaScriptPath}{$betaPrefix}application.js?version=01132011120915{$endScriptTag}
                         {$openSearchScript}
                        {$filePageScript}
+                       <!--[endif]-->
                  </body>
                </html>
 HTML;


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to