UC Mini should be blacklisted
[lhc/web/wiklou.git] / resources / src / startup.js
index 62ee94e..5e05590 100644 (file)
@@ -64,10 +64,10 @@ function isCompatible( str ) {
                // Hardcoded exceptions for browsers that pass the requirement but we don't want to
                // support in the modern run-time.
                && !(
-                       ua.match( /webOS\/1\.[0-4]/ ) ||
+                       ua.match( /webOS\/1\.[0-4]|SymbianOS|Series60|NetFront|Opera Mini|S40OviBrowser|MeeGo|Android.+Glass/ ) ||
                        ua.match( /PlayStation/i ) ||
-                       ua.match( /SymbianOS|Series60|NetFront|Opera Mini|S40OviBrowser|MeeGo/ ) ||
-                       ( ua.match( /Glass/ ) && ua.match( /Android/ ) )
+                       // UC Mini (speed mode on)
+                       ua.match( /^Mozilla\/5\.0 .+ Gecko\/$/ )
                )
        );
 }
@@ -77,7 +77,7 @@ function isCompatible( str ) {
        var NORLQ, script;
        if ( !isCompatible() ) {
                // Undo class swapping in case of an unsupported browser.
-               // See OutputPage::getHeadScripts().
+               // See ResourceLoaderClientHtml::getDocumentAttributes().
                document.documentElement.className = document.documentElement.className
                        .replace( /(^|\s)client-js(\s|$)/, '$1client-nojs$2' );