Start invitation; notification; add profile avatar in me
This commit is contained in:
@ -1,4 +1,28 @@
|
||||
function manage_popup(client) {
|
||||
// timer in milliseconds
|
||||
function sleep(ms) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
export {manage_popup}
|
||||
async function create_popup(text = undefined, timer = undefined) {
|
||||
|
||||
if (text == undefined)
|
||||
text = "notice undefined";
|
||||
|
||||
let popup = document.getElementById("popup");
|
||||
popup.textContent = "Notice: " + text;
|
||||
popup.style.opacity = 0.95;
|
||||
popup.onclick = async () => {
|
||||
popup.style.opacity = 0;
|
||||
return ;
|
||||
}
|
||||
|
||||
if (timer == undefined)
|
||||
timer = 5000;
|
||||
await sleep(timer);
|
||||
|
||||
popup.style.opacity = 0;
|
||||
//popup.style.visibility = "hidden"
|
||||
|
||||
}
|
||||
|
||||
export {create_popup}
|
||||
|
Reference in New Issue
Block a user