mirror of
https://github.com/Elatteria/Elatteria-Website.git
synced 2025-07-22 15:12:11 +03:00
more flagle additions
This commit is contained in:
24
E-Cafe Website/Scripts/flagle.js
Normal file
24
E-Cafe Website/Scripts/flagle.js
Normal 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!")
|
||||
}
|
||||
}
|
3
E-Cafe Website/Scripts/scroll.js
Normal file
3
E-Cafe Website/Scripts/scroll.js
Normal file
@@ -0,0 +1,3 @@
|
||||
function scrollDown(positionX, positionY) {
|
||||
window.scrollTo(positionX, positionY);
|
||||
}
|
Reference in New Issue
Block a user