Merge pull request #645 from Calyhre/fix/electron-detection

Change Electron detection to be user agent based only
This commit is contained in:
David Benson 2019-11-08 10:14:40 +00:00 committed by GitHub
commit e71a6a71a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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') ||