From: Timo Tijhof Date: Mon, 20 Aug 2018 05:11:17 +0000 (+0100) Subject: resourceloader: Merge the two ua.match() calls in startup.js X-Git-Tag: 1.34.0-rc.0~4368^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=53f2a51bd5f303874443feb02830dfe5434c076e;p=lhc%2Fweb%2Fwiklou.git resourceloader: Merge the two ua.match() calls in startup.js Covered by tests. No need for the separate //i regex. Change-Id: I2fb5c8f45a3b9d9d20884c58d1adbd9e6cee2814 --- 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/ ) ); };