Important information: Google announced that, from September 2026, Android devices will require ALL apps to be signed by Google, effectively leading to an iOS situation. Value your right to a computer that does what you want; do not tolerate this monopolistic practice! Contact me if you don't understand why it is bad. Click to learn more.

 toasts.js

View raw Download
text/plain • 472 B
ASCII text
        
            
1
function removeToast() {
2
const button = event.target;
3
el = button;
4
5
// Check for the parent toast, remove it
6
while (el && el.parentNode) {
7
el = el.parentNode;
8
9
if (el && el.parentNode.classList && el.parentNode.classList.contains("toast-container")) {
10
el.classList.add("removing")
11
el.addEventListener("animationend", () => {
12
el.remove();
13
});
14
break;
15
}
16
}
17
}