From 400205745ad885b054952bb00ea9e4a56bdba44d Mon Sep 17 00:00:00 2001
From: Charley DAVID <hello@calyh.re>
Date: Fri, 8 Nov 2019 10:39:02 +0100
Subject: [PATCH] Change Electron detection to be user agent based only

---
 src/main/webapp/index.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html
index 35f0b3478..3a849a045 100644
--- a/src/main/webapp/index.html
+++ b/src/main/webapp/index.html
@@ -17,8 +17,8 @@
     <meta name="mobile-web-app-capable" content="yes">
 	<meta name="theme-color" content="#d89000">
 	<script type="text/javascript">
-		var mxIsElectron = (window && window.process && window.process.type) || (navigator.userAgent.toLowerCase().indexOf(' electron/') > -1);
-		var mxIsElectron5 = mxIsElectron && parseInt(process.versions.electron) >= 5;
+		var mxIsElectron = window && window.process && window.process.type;
+		var mxIsElectron5 = mxIsElectron && parseInt(window.process.versions.electron) >= 5;
 		var hostName = window.location.hostname;
 		// Supported domains are *.draw.io that draw.io host, or the packaged version in Quip
 		var supportedDomain = (hostName.substring(hostName.length - 8, hostName.length) === '.draw.io') ||
-- 
GitLab