Telegram Web K with changes to work inside I2P
https://web.telegram.i2p/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
372 B
12 lines
372 B
const toastEl = document.createElement('div'); |
|
toastEl.classList.add('toast'); |
|
export function toast(html: string) { |
|
toastEl.innerHTML = html; |
|
document.body.append(toastEl); |
|
|
|
if(toastEl.dataset.timeout) clearTimeout(+toastEl.dataset.timeout); |
|
toastEl.dataset.timeout = '' + setTimeout(() => { |
|
toastEl.remove(); |
|
delete toastEl.dataset.timeout; |
|
}, 3000); |
|
} |