ebiten/_docs/public/scripts/force-https.js
2016-08-28 00:58:27 +09:00

15 lines
374 B
JavaScript

'use strict';
(function() {
var location = window.location;
if (location.hostname === 'localhost' || location.hostname === '127.0.0.1') {
return;
}
var protocol = location.protocol;
if (protocol === 'https:') {
return;
}
var url = 'https:' + window.location.href.substring(protocol.length);
window.location.href = url;
})();