Create ajax.js

This commit is contained in:
Boof 2023-01-17 09:49:38 +01:00 committed by GitHub
parent 51c3bb9a05
commit 110241d434
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

11
js/ajax.js Normal file
View File

@ -0,0 +1,11 @@
// Set delay to ms
function delay(milliseconds){
return new Promise(resolve => {
setTimeout(resolve, milliseconds);
});
}
// Get the userip and store it in a variable
$.getJSON("https://europe-central2-portfolio-website-374313.cloudfunctions.net/getip", function(data) {
})
var userip = (data.ip);