(message, duration)
| 106 | |
| 107 | let logTimer |
| 108 | function log(message, duration) { |
| 109 | clearTimeout(logTimer) |
| 110 | msg.css({ opacity: 1 }).html(message) |
| 111 | if (duration) { |
| 112 | logTimer = setTimeout(() => { |
| 113 | msg.animate({ opacity: 0 }, 500, () => msg.empty()) |
| 114 | }, duration) |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | $(() => { |
| 119 | saveBtn.on('click', save) |
no test coverage detected