CensoredManager/assets/js/index.js
mctaylors 5f64caf6bc
Initial commit
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2024-06-06 22:39:59 +05:00

15 lines
No EOL
565 B
JavaScript

const token = docCookies.getItem("token");
const amountElement = document.getElementById("amount");
const listElement = document.getElementById("list");
const userElement = document.getElementById("user");
window.addEventListener("load", async function () {
userElement.innerText = docCookies.getItem("token").substring(0, 4) + "**";
listElement.href = `https://${api_provider}/get_cheques?token=${token}`;
amountElement.innerText = await getBalance(token);
});
function logout() {
docCookies.removeItem("token");
window.location = "/auth/";
}