fix js

parent 2e640350
......@@ -15,11 +15,10 @@
var errorEmoji = emojiArray[Math.floor(Math.random() * emojiArray.length)];
errorEmojiContainer.appendChild(document.createTextNode(errorEmoji));
let url = new Url(window.location.href);
let path = url.pathname;
let path = window.location.pathname;
if (new RegExp('^\/[a-z]{2}', 'i')) {
path = path.substr(3);
}
window.location.replace(url.hostname + path)
window.location.replace('https://' + window.location.hostname + path)
</script>
{{ end }}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment