diff options
Diffstat (limited to 'extension')
-rw-r--r-- | extension/interactive-bgm.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/extension/interactive-bgm.js b/extension/interactive-bgm.js index 5db7d58..78495f5 100644 --- a/extension/interactive-bgm.js +++ b/extension/interactive-bgm.js @@ -16,15 +16,15 @@ window.addEventListener('load', () => { } }); -let hasShownCreateTrack = false; +let isShowingCreateTrack = false; browser.runtime.onMessage.addListener(({createTrack}) => { if (createTrack) { - if (hasShownCreateTrack) { + if (isShowingCreateTrack) { return; } - hasShownCreateTrack = true; + isShowingCreateTrack = true; const container = document.createElement('div') document.body.appendChild(container); @@ -126,6 +126,7 @@ browser.runtime.onMessage.addListener(({createTrack}) => { browser.runtime.sendMessage({type: 'uploadTrack', base64, trackName}).then(() => { document.body.removeChild(container); + isShowingCreateTrack = false; }); }; |