CensoredManager/assets/js/index.js

15 lines
565 B
JavaScript
Raw Permalink Normal View History

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/";
}