1
0
mirror of https://github.com/c9fe/22120.git synced 2024-08-18 23:29:45 +02:00
22120/public/redirector.html
Cris Stringfellow 3e8d2ebae9
create
2023-01-15 02:07:52 +08:00

22 lines
531 B
HTML

<!DOCTYPE html>
<meta name="referrer" content="no-referrer" />
<h1>About to index archive and index <code id=url-text></code></h1>
<script type=module>
const url = new URLSearchParams(location.search).get('url');
const text = document.querySelector('#url-text');
let valid = false;
try {
new URL(url);
valid = true;
} catch(e) {
console.warn(`URL ${url} is not a valid URL`);
}
if ( valid ) {
text.innerText = url;
setTimeout(() => {
window.location.href = url;
}, 1000);
}
</script>