Add logic for param checking (redirections from old domain)
This commit is contained in:
+3
-15
@@ -6,7 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Alex 👋</title>
|
||||
|
||||
<link rel="stylesheet" href="/static/css/main.css">
|
||||
<link rel="stylesheet" href="https://thatalex.dev/static/css/main.css">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans:wght@200&display=swap" rel="stylesheet">
|
||||
@@ -15,6 +15,7 @@
|
||||
<body onload="setClip()">
|
||||
<div class="welcome"></div>
|
||||
|
||||
<div id="querydiv"></div>
|
||||
<div id="welcome-text">
|
||||
<h3>👋, I'm Alex!</h3>
|
||||
<p>I'm a Javascript & Java developer, working on random Node apps and Minecraft plugins!<br>
|
||||
@@ -42,19 +43,6 @@
|
||||
<a href="https://instagram.com/thatoneawex" style="color:white;" target="_blank"><i class="fa fa-instagram" aria-hidden="true"></i></a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
async function setClip() {
|
||||
const clipSpan = document.getElementById("clip");
|
||||
const response = await fetch("https://developers.medal.tv/v1/latest?userId=215577&limit=1", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"authorization": "pub_ecEyOlY5G2u9476DMGOxcxiNcaOTEjmq",
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
});
|
||||
const data = await response.json();
|
||||
clipSpan.innerHTML = `${data.contentObjects[0].embedIframeCode}<br>${data.contentObjects[0].contentTitle}`;
|
||||
}
|
||||
</script>
|
||||
<script src="https://thatalex.dev/static/js/paramSearch.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>lulawexLIVE >> Links</title>
|
||||
<title>Alex > Links</title>
|
||||
<link rel="stylesheet" href="/static/css/tree.css">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css">
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</a>
|
||||
|
||||
<div class="userName">
|
||||
lulawexLIVE
|
||||
Alex
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Redirecting..</title>
|
||||
</head>
|
||||
<script>
|
||||
location.href = "https://top.gg/bot/868689248218411050"
|
||||
</script>
|
||||
</html>
|
||||
@@ -24,6 +24,10 @@ hr {
|
||||
width:20%;
|
||||
}
|
||||
|
||||
#querydiv {
|
||||
padding-top:40px;
|
||||
}
|
||||
|
||||
.welcome {
|
||||
width: 100%;
|
||||
background-image: url('../../static/img/profile.png');
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
async function paramSearch() {
|
||||
const urlSearchParams = new URLSearchParams(window.location.search);
|
||||
const params = Object.fromEntries(urlSearchParams.entries());
|
||||
const div = document.getElementById("querydiv");
|
||||
|
||||
if (params.reason) {
|
||||
if (params.reason == "old_domain") {
|
||||
div.innerHTML = '<p style="color:red;">You have been redirected here from an old domain. Please use this domain.</p>';
|
||||
}
|
||||
}
|
||||
|
||||
const clipSpan = document.getElementById("clip");
|
||||
const response = await fetch("https://developers.medal.tv/v1/latest?userId=215577&limit=1", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"authorization": "pub_ecEyOlY5G2u9476DMGOxcxiNcaOTEjmq",
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
});
|
||||
const data = await response.json();
|
||||
clipSpan.innerHTML = `${data.contentObjects[0].embedIframeCode}<br>${data.contentObjects[0].contentTitle}`;
|
||||
}
|
||||
|
||||
window.onload = paramSearch();
|
||||
Reference in New Issue
Block a user