(message, duration)
| 132 | |
| 133 | let logTimer |
| 134 | function log(message, duration) { |
| 135 | clearTimeout(logTimer) |
| 136 | msg.css({ opacity: 1 }).html(message) |
| 137 | if (duration) { |
| 138 | logTimer = setTimeout(() => { |
| 139 | msg.animate({ opacity: 0 }, 500, () => msg.empty()) |
| 140 | }, duration) |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | $(() => { |
| 145 | saveBtn.on('click', save) |
no test coverage detected