blob: 6019c04584566b31297016b3d3e8850dfe07fb25 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<script>
document.addEventListener('DOMContentLoaded', function() {
var url = window.location.protocol + '//{{host}}' + window.location.pathname + '?do=_https_magic';
var magic = "{{magic}}";
$.post(url, function (data) {
if (!data) return;
if (data.a === magic || data.b === magic) {
// Seems safe to redirect
window.location.host = '{{host}}';
}
}, 'json');
});
</script>
|