added/changed around a few scripts
This commit is contained in:
+2
-1
@@ -12,7 +12,7 @@
|
|||||||
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans:wght@200&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans:wght@200&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
</head>
|
</head>
|
||||||
<body onload="setClip()">
|
<body>
|
||||||
<div class="welcome"></div>
|
<div class="welcome"></div>
|
||||||
|
|
||||||
<div id="querydiv"></div>
|
<div id="querydiv"></div>
|
||||||
@@ -54,6 +54,7 @@
|
|||||||
|
|
||||||
<script src="https://thatalex.dev/static/js/paramSearch.js"></script>
|
<script src="https://thatalex.dev/static/js/paramSearch.js"></script>
|
||||||
<script src="https://thatalex.dev/static/js/spotifyWidget.js"></script>
|
<script src="https://thatalex.dev/static/js/spotifyWidget.js"></script>
|
||||||
|
<script src="https://thatalex.dev/static/js/medalClip.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
if (document.readyState === 'interactive' || document.readyState === 'complete') {
|
if (document.readyState === 'interactive' || document.readyState === 'complete') {
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
const clipSpan = document.getElementById("clip");
|
||||||
|
fetch("https://developers.medal.tv/v1/latest?userId=215577&limit=1", {
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"authorization": "pub_ecEyOlY5G2u9476DMGOxcxiNcaOTEjmq",
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
}
|
||||||
|
}).then(async function(response) {
|
||||||
|
const data = await response.json();
|
||||||
|
clipSpan.innerHTML = `${data.contentObjects[0].embedIframeCode}<br>${data.contentObjects[0].contentTitle}`;
|
||||||
|
});
|
||||||
@@ -1,24 +1,10 @@
|
|||||||
async function paramSearch() {
|
|
||||||
const urlSearchParams = new URLSearchParams(window.location.search);
|
const urlSearchParams = new URLSearchParams(window.location.search);
|
||||||
const params = Object.fromEntries(urlSearchParams.entries());
|
const params = Object.fromEntries(urlSearchParams.entries());
|
||||||
const div = document.getElementById("querydiv");
|
const div = document.getElementById("querydiv");
|
||||||
|
|
||||||
|
console.log(params)
|
||||||
if (params.reason) {
|
if (params.reason) {
|
||||||
if (params.reason == "old_domain") {
|
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>';
|
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