Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | export const EndScreenUI = { showFailure(element) { EndScreenUI.show({ parentEl: element, childSelector: '.failure' }); }, showSuccess(element) { EndScreenUI.show({ parentEl: element, childSelector: '.success' }); }, show({ parentEl, childSelector }) { const childEl = parentEl.querySelector(childSelector); const restart = parentEl.querySelector('#restart'); childEl.style.display = 'block'; parentEl.style.display = 'block'; // eslint-disable-line no-param-reassign restart.addEventListener('click', () => { window.location = window.location; // eslint-disable-line no-self-assign }); }, }; |