From 53f2a51bd5f303874443feb02830dfe5434c076e Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Mon, 20 Aug 2018 06:11:17 +0100 Subject: [PATCH] resourceloader: Merge the two ua.match() calls in startup.js Covered by tests. No need for the separate //i regex. Change-Id: I2fb5c8f45a3b9d9d20884c58d1adbd9e6cee2814 --- resources/src/startup/startup.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/resources/src/startup/startup.js b/resources/src/startup/startup.js index b2d86e21ce..7e7fd6a4a6 100644 --- a/resources/src/startup/startup.js +++ b/resources/src/startup/startup.js @@ -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/ ) ); }; -- 2.20.1