Scenario generator for vore roleplay and story ideas.
https://scenario-generator.deliciousreya.net/responses
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.
19 lines
669 B
19 lines
669 B
export function showPopup(parent: HTMLElement, text: string, className?: 'success'|'info'|'warning'|'error'): void {
|
|
if (!parent.classList.contains("jsPopupHost")) {
|
|
console.warn(parent, "should be jsPopupHost")
|
|
}
|
|
const container = parent.ownerDocument.createElement("div")
|
|
container.classList.add("jsPopupContainer")
|
|
parent.appendChild(container)
|
|
const popup = parent.ownerDocument.createElement("div")
|
|
popup.classList.add("jsPopup")
|
|
if (className) {
|
|
popup.classList.add(className)
|
|
}
|
|
popup.innerText = text
|
|
container.appendChild(popup)
|
|
popup.addEventListener('animationend', () => {
|
|
container.removeChild(popup)
|
|
parent.removeChild(container)
|
|
})
|
|
}
|
|
|