feat: inform users about empty link

This commit is contained in:
Aliberk Sandıkçı 2023-06-25 19:07:40 +03:00
parent 57e515b7fe
commit 8517e9fa05
1 changed files with 12 additions and 8 deletions

View File

@ -7,17 +7,21 @@
<body>
<noscript>PLEASE ENABLE JAVASCRIPT</noscript>
<p>You will be automatically directed to the <span id="info">ERROR - PLEASE ENABLE JAVASCRIPT OR CONTACT WITH ADMIN</span></p>
<div id="info1">You will be automatically directed to the <span id="info2">ERROR - PLEASE ENABLE JAVASCRIPT OR CONTACT
WITH ADMIN</span></div>
<script>
var a = location.href;
if (a.indexOf("?") == -1) {
document.getElementById("info1").innerHTML = "<h3>You did not enter any url!</h3><br>Please type a proper link like <b>https://l.asandikci.com/?redirect-link</b>"
}
else {
var b = a.substring(a.indexOf("?") + 1);
var c = "https://l.aliberksandikci.com.tr/" + b;
var d = "<a href='" + c + "'> l.aliberksandikci.com.tr/" + b;
document.getElementById("info").innerHTML = d;
window.location.replace(c);
document.getElementById("info2").innerHTML = d;
// window.location.replace(c);
}
</script>
</body>