diff --git a/resources/js/ext.uls.init.js b/resources/js/ext.uls.init.js index 3faa2999..95c48384 100644 --- a/resources/js/ext.uls.init.js +++ b/resources/js/ext.uls.init.js @@ -106,6 +106,18 @@ return unique; }; + /** + * Checks whether the browser is supported. + * Browse support policy: http://www.mediawiki.org/wiki/Browser_support#Grade_A + * @return boolean + */ + mw.uls.isBrowserSupported = function () { + // boxModel is not supported in IE versions under 8. + // We are checking for boxModel here because without that features + // our grid system fails and it makes the ULS non-functional. + return $.support.boxModel; + }; + /** * i18n initialization */ @@ -147,6 +159,10 @@ } $( document ).ready( function () { + if ( !mw.uls.isBrowserSupported() ) { + return; + } + /* * The 'als' is used in a non-standard way in MediaWiki - * it may be used to represent the Allemanic language, @@ -159,6 +175,5 @@ // JavaScript side i18n initialization i18nInit(); - } ); }( jQuery, mediaWiki, window, document ) ); diff --git a/resources/js/ext.uls.interface.js b/resources/js/ext.uls.interface.js index f579c47f..e48b72a3 100644 --- a/resources/js/ext.uls.interface.js +++ b/resources/js/ext.uls.interface.js @@ -232,6 +232,10 @@ !mw.config.get( 'wgULSAnonCanChangeLanguage' ) ), ulsPosition = mw.config.get( 'wgULSPosition' ); + if ( !mw.uls.isBrowserSupported() ) { + return; + } + if ( ulsPosition === 'interlanguage' ) { // The interlanguage links section $pLang = $( '#p-lang' );