https.js 309 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 var SEA = require('./root'); try{ if(SEA.window){ if(location.protocol.indexOf('s') < 0 && location.host.indexOf('localhost') < 0 && location.protocol.indexOf('file:') < 0){ location.protocol = 'https:'; // WebCrypto does NOT work without HTTPS! } } }catch(e){}