hubl/src/scripts/save-feedback.js

19 lines
590 B
JavaScript
Raw Normal View History

2020-10-07 12:25:53 +00:00
document.addEventListener("DOMContentLoaded", () => {
const Toast = Swal.mixin({
toast: true,
position: 'top',
showConfirmButton: false,
timer: 3000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
2021-01-29 13:44:06 +00:00
});
2020-10-07 12:25:53 +00:00
document.addEventListener("save", () => {
Toast.fire({
icon: 'success',
2021-01-29 13:44:06 +00:00
title: document.querySelector('#swal-content-text').innerHTML
2020-10-07 12:25:53 +00:00
})
});
});