A bit of an overhaul
- Built in the MCW - Updated some links to direct to awexxx.xyz - Changed around the CSS
This commit is contained in:
@@ -3,11 +3,10 @@
|
||||
// Dvlpr. Awexx //
|
||||
////////////////////
|
||||
|
||||
const avatarURL = 'https://minotar.net/avatar/'
|
||||
console.log(`Initiated the Hive Lookup Script`);
|
||||
const avatarURL = 'https://minotar.net/avatar/'
|
||||
const playerName = document.getElementById("inputBox").value;
|
||||
|
||||
async function getGamesData() {
|
||||
const playerName = document.getElementById("inputBox").value
|
||||
if (document.getElementById("gameBox").value === 'sg' || document.getElementById("gameBox").value === 'Survival Games' ) {
|
||||
const apiURL = `https://api.hivemc.com/v1/player/${playerName}/sg`;
|
||||
const data = await fetch(apiURL).then(response => response.json());
|
||||
@@ -255,5 +254,4 @@ console.log(`Initiated the Hive Lookup Script`);
|
||||
document.querySelector("#link").innerHTML = "<a href=" + apiURL + ">Raw JSON Link"
|
||||
var link = document.getElementById("link");
|
||||
link.style.display = "block";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,10 +6,12 @@
|
||||
const medalapi = 'https://developers.medal.tv/v1/latest?userId=215577&limit=1'
|
||||
|
||||
async function medalClips() {
|
||||
window.addEventListener('load', function () {
|
||||
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
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
function checkparam() {
|
||||
const params = new URLSearchParams(window.location.search)
|
||||
// console.log(params) Only uncomment this for testing purposes.
|
||||
|
||||
if (params.get('type') === 'pt') {
|
||||
const pt = document.getElementById("pt");
|
||||
pt.style.display = "block";
|
||||
const embed = document.getElementById("embed");
|
||||
embed.style.display = "none";
|
||||
}
|
||||
|
||||
if (params.get('status') === 'success') {
|
||||
const pt = document.getElementById("pt");
|
||||
pt.style.display = "none";
|
||||
const embed = document.getElementById("embed");
|
||||
embed.style.display = "none";
|
||||
const success = document.getElementById("success");
|
||||
success.style.display = "block";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user