Skip to content

Commit a19bdb3

Browse files
committed
Update redirect.html
1 parent b7797b0 commit a19bdb3

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

redirect.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,19 @@
120120

121121
const url = new URL(window.location.href).searchParams;
122122

123-
title.innerText = url.get('text');
124-
button.onclick = 'window.open('+ url.get('to') +', "_blank")';
123+
const toURL = (new URL(url.get('to'))).hostname;
124+
125+
if (toURL === 'codeit.codes'
126+
|| toURL === 'dev.codeit.codes') {
127+
128+
title.innerText = url.get('text');
129+
button.onclick = 'window.open('+ url.get('to') +', "_blank")';
130+
131+
} else {
132+
133+
window.top.location.href = window.location.origin;
134+
135+
}
125136

126137
</script>
127138
</body>

0 commit comments

Comments
 (0)