Dynamic Medal Clips for index lul
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
///////////////////////////////////
|
||||||
|
// Fetch Script for Awex Clips //
|
||||||
|
// Medal.tv API //
|
||||||
|
///////////////////////////////////
|
||||||
|
|
||||||
|
const medalapi = 'https://developers.medal.tv/v1/latest?userId=215577&limit=1'
|
||||||
|
|
||||||
|
async function medalClips() {
|
||||||
|
const { contentObjects } = await fetch(medalapi, {
|
||||||
|
method: 'GET',
|
||||||
|
headers: { 'Authorization': 'pub_x9mjeQnqk07tEK1ge7w2xHYxTpTEbKwN', 'Content-Type': 'application/json' }
|
||||||
|
}).then(response => response.json())
|
||||||
|
|
||||||
|
document.querySelector("#clip").innerHTML = contentObjects[0].embedIframeCode
|
||||||
|
}
|
||||||
+5
-3
@@ -10,6 +10,7 @@
|
|||||||
<script src="https://cdn.jsdelivr.net/gh/plaguecraft-team/pcn-web/storage/assets/js/playersBackend.js"></script>
|
<script src="https://cdn.jsdelivr.net/gh/plaguecraft-team/pcn-web/storage/assets/js/playersBackend.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/gh/plaguecraft-team/pcn-web/storage/assets/js/hidePanel.js"></script>
|
<script src="https://cdn.jsdelivr.net/gh/plaguecraft-team/pcn-web/storage/assets/js/hidePanel.js"></script>
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/plaguecraft-team/pcn-web/storage/assets/css/form.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/plaguecraft-team/pcn-web/storage/assets/css/form.css">
|
||||||
|
<script src="https://cdn.jsdelivr.net/gh/awexxx/awexxx.github.io/assets/js/medalclips.js"></script>
|
||||||
<link rel="stylesheet" href="assets/css/style.css">
|
<link rel="stylesheet" href="assets/css/style.css">
|
||||||
<link rel="shortcut icon" type="image/png" href="assets/img/logo.png"/>
|
<link rel="shortcut icon" type="image/png" href="assets/img/logo.png"/>
|
||||||
<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">
|
||||||
@@ -20,7 +21,7 @@
|
|||||||
<meta content="assets/img/logo.png" property="og:image">
|
<meta content="assets/img/logo.png" property="og:image">
|
||||||
<meta content="#9c2d1c" data-react-helmet="true" name="theme-color">
|
<meta content="#9c2d1c" data-react-helmet="true" name="theme-color">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body onload="medalClips()">
|
||||||
<h3 style="padding-top:20px;">Awexx</h3>
|
<h3 style="padding-top:20px;">Awexx</h3>
|
||||||
<br>
|
<br>
|
||||||
<ul id="navbar">
|
<ul id="navbar">
|
||||||
@@ -53,7 +54,7 @@
|
|||||||
|
|
||||||
<form onsubmit="return false">
|
<form onsubmit="return false">
|
||||||
<label style="font-size:20px; text-align:center;" for="fname">In-Game Name</label><br />
|
<label style="font-size:20px; text-align:center;" for="fname">In-Game Name</label><br />
|
||||||
<input style="font-size:20px;" type="text" id="inputBox" name="playerName" onkeypress="checkBoxes()" placeholder="Put 'babyawex' here!" required><br />
|
<input style="font-size:20px;" type="text" id="inputBox" name="playerName" placeholder="Put 'babyawex' here!" required><br />
|
||||||
<hr style="width:60px";>
|
<hr style="width:60px";>
|
||||||
<div id="radioBtns">
|
<div id="radioBtns">
|
||||||
<label style="font-size:20px; display:inline;">Economy</label><br />
|
<label style="font-size:20px; display:inline;">Economy</label><br />
|
||||||
@@ -87,7 +88,8 @@
|
|||||||
|
|
||||||
<h2 id="medal">Follow me on <span style="color:orange;"><a href="https://medal.tv/itsawexx" target="_blank">Medal!</a></span></h2>
|
<h2 id="medal">Follow me on <span style="color:orange;"><a href="https://medal.tv/itsawexx" target="_blank">Medal!</a></span></h2>
|
||||||
|
|
||||||
<iframe width="640" height="360" style="border: none;" src="https://medal.tv/clip/44844498/vpr34wEBY" allow="autoplay" allowfullscreen></iframe></p>
|
<div id="clip"></div><br />
|
||||||
|
<i>Thanks to the Medal API, this stays up to date!</i><br />
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user