more flagle additions

This commit is contained in:
Ebsku
2022-12-20 18:21:34 +02:00
parent 51478d74c7
commit 9e78878acc
11 changed files with 190 additions and 51 deletions

View File

@@ -0,0 +1,24 @@
async function getFlag() {
const getFlag = await fetch('https://flagcdn.com/en/codes.json')
const flag = await getFlag.json();
var inputField = document.getElementById("guessInput").value.toLowerCase();
document.getElementsByClassName("gamedle-section").innerHTML = guessInput;
if (inputField != flag.us.toLowerCase()) {
document.getElementById("guessInput").value=null;
window.alert("Wrong country!");
}
else {
document.getElementById("guessInput").value=null;
window.alert("Correct!")
}
}

View File

@@ -0,0 +1,3 @@
function scrollDown(positionX, positionY) {
window.scrollTo(positionX, positionY);
}