var SEA = require('./root'); try{ if(SEA.window){ if(location.protocol.indexOf('s') < 0 && location.host.indexOf('localhost') < 0 && ! /^127\.\d+\.\d+\.\d+$/.test(location.hostname) && location.protocol.indexOf('file:') < 0){ console.warn('HTTPS needed for WebCrypto in SEA, redirecting...'); location.protocol = 'https:'; // WebCrypto does NOT work without HTTPS! } } }catch(e){}