Sha256: 2af5ed6e5cc739027da1c9a6a6902bfcf80da4d00dae111d6d8d6239d8c36beb
Contents?: true
Size: 593 Bytes
Versions: 3
Compression:
Stored size: 593 Bytes
Contents
window.showInfo = (title, options = {}) => { const info = document.getElementById("notifications"); info.innerHTML = title; info.classList.add("show"); info.classList.remove("alert"); if (options && options.class) { info.classList.add(options.class); } if (window.notificationTimeout) { clearTimeout(window.notificationTimeout); } window.notificationTimeout = setTimeout(() => { info.classList.remove("show") }, options && options.delay || 3000); }; window.showAlert = (title, options = {}) => { options.class = "alert" window.showInfo(title, options); };
Version data entries
3 entries across 3 versions & 1 rubygems