hns-links/templates/https.js

7 lines
162 B
JavaScript

if (location.protocol !== 'https:') {
location.replace(`https:${location.href.substring(location.protocol.length)}`);
}
else{
console.log("Already Https");
}