2018-03-25 14:03:08 -04:00
|
|
|
// License: LGPL-3.0-or-later
|
2018-03-25 13:30:42 -04:00
|
|
|
var notification = function(msg, err) {
|
|
|
|
var el = document.getElementById('js-notification')
|
|
|
|
if(err) {el.className = 'show error'}
|
|
|
|
else {el.className = 'show'}
|
|
|
|
el.innerText = msg
|
|
|
|
window.setTimeout(function() {
|
|
|
|
el.className = ''
|
|
|
|
el.innerText = ''
|
|
|
|
}, 7000)
|
|
|
|
}
|
|
|
|
module.exports = notification
|
|
|
|
|