resourceloader: Merge the two ua.match() calls in startup.js
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 20 Aug 2018 05:11:17 +0000 (06:11 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Mon, 20 Aug 2018 05:12:10 +0000 (06:12 +0100)
Covered by tests. No need for the separate //i regex.

Change-Id: I2fb5c8f45a3b9d9d20884c58d1adbd9e6cee2814

resources/src/startup/startup.js

index b2d86e2..7e7fd6a 100644 (file)
@@ -72,10 +72,7 @@ window.isCompatible = function ( str ) {
                // Hardcoded exceptions for browsers that pass the requirement but we don't want to
                // support in the modern run-time.
                // Note: Please extend the regex instead of adding new ones
-               !(
-                       ua.match( /MSIE 10|webOS\/1\.[0-4]|SymbianOS|Series60|NetFront|Opera Mini|S40OviBrowser|MeeGo|Android.+Glass|^Mozilla\/5\.0 .+ Gecko\/$|googleweblight/ ) ||
-                       ua.match( /PlayStation/i )
-               )
+               !ua.match( /MSIE 10|webOS\/1\.[0-4]|SymbianOS|Series60|NetFront|Opera Mini|S40OviBrowser|MeeGo|Android.+Glass|^Mozilla\/5\.0 .+ Gecko\/$|googleweblight|PLAYSTATION|PlayStation/ )
        );
 };