diff options
author | Florrie <towerofnix@gmail.com> | 2019-03-24 12:02:12 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2019-03-24 12:02:12 -0300 |
commit | 0d4359e08b7361ba4deceed2c01a25a368ce52cf (patch) | |
tree | 04cebe80b44fcb0e3f012b6fcded0e63d19c8922 /extension | |
parent | 895619545e629b8c03d09f8685e2aa71f84aa92a (diff) |
Allow re-showing upload form
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; }); }; |