From de8339f77bb3875bd133f2aa01ddb203425448f8 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 13 Apr 2024 15:24:49 +0300 Subject: [PATCH] Fix ESLint --- public/scripts/popup.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/public/scripts/popup.js b/public/scripts/popup.js index 217991611..4e75431f4 100644 --- a/public/scripts/popup.js +++ b/public/scripts/popup.js @@ -71,7 +71,7 @@ export class Popup { this.ok.textContent = okButton ?? 'OK'; this.cancel.textContent = cancelButton ?? 'Cancel'; - switch(type) { + switch (type) { case POPUP_TYPE.TEXT: { this.input.style.display = 'none'; this.cancel.style.display = 'none'; @@ -107,16 +107,16 @@ export class Popup { // illegal argument } - this.input.addEventListener('keydown', (evt)=>{ + this.input.addEventListener('keydown', (evt) => { if (evt.key != 'Enter' || evt.altKey || evt.ctrlKey || evt.shiftKey) return; evt.preventDefault(); evt.stopPropagation(); this.completeAffirmative(); }); - this.ok.addEventListener('click', ()=>this.completeAffirmative()); - this.cancel.addEventListener('click', ()=>this.completeNegative()); - const keyListener = (evt)=>{ + this.ok.addEventListener('click', () => this.completeAffirmative()); + this.cancel.addEventListener('click', () => this.completeNegative()); + const keyListener = (evt) => { switch (evt.key) { case 'Escape': { evt.preventDefault(); @@ -134,7 +134,7 @@ export class Popup { async show() { document.body.append(this.dom); this.dom.style.display = 'block'; - switch(this.type) { + switch (this.type) { case POPUP_TYPE.INPUT: { this.input.focus(); break; @@ -203,7 +203,7 @@ export class Popup { duration: animation_duration, easing: animation_easing, }); - delay(animation_duration).then(()=>{ + delay(animation_duration).then(() => { this.dom.remove(); });