diff options
author | 2021-08-27 18:13:24 +0530 | |
---|---|---|
committer | 2021-08-27 18:13:24 +0530 | |
commit | 155c4b832281348c16be1f4ef667e6e23dbf1bd8 (patch) | |
tree | d144e2de2e6c7fb2e334246e8a4aecdbeb08ef8d /recipes/googlecalendar/webview-unsafe.js | |
parent | docs: fixed template file for creating recipe. (diff) | |
download | ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.gz ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.zst ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.zip |
chore: normalized all recipes to ensure compatibility with es6 (#639)
- Removed some calls to set badge with '0' all the time.
- Removed all 'sourceMaps' since they are all outdated atm.
Diffstat (limited to 'recipes/googlecalendar/webview-unsafe.js')
-rw-r--r-- | recipes/googlecalendar/webview-unsafe.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/recipes/googlecalendar/webview-unsafe.js b/recipes/googlecalendar/webview-unsafe.js index 68145ad..c47f572 100644 --- a/recipes/googlecalendar/webview-unsafe.js +++ b/recipes/googlecalendar/webview-unsafe.js | |||
@@ -12,24 +12,24 @@ const waitFor = (condition, callback) => { | |||
12 | const showModal = text => { | 12 | const showModal = text => { |
13 | modal.querySelector('p').innerHTML = text; | 13 | modal.querySelector('p').innerHTML = text; |
14 | updates += 1; | 14 | updates += 1; |
15 | window.franz.setBadge(updates); | 15 | window.ferdi.setBadge(updates); |
16 | modal.classList.add('open'); | 16 | modal.classList.add('open'); |
17 | }; | 17 | }; |
18 | 18 | ||
19 | const hideModal = () => { | 19 | const hideModal = () => { |
20 | modal.querySelector('p').innerHTML = ''; | 20 | modal.querySelector('p').innerHTML = ''; |
21 | updates -= 1; | 21 | updates -= 1; |
22 | window.franz.setBadge(updates); | 22 | window.ferdi.setBadge(updates); |
23 | modal.classList.remove('open'); | 23 | modal.classList.remove('open'); |
24 | }; | 24 | }; |
25 | 25 | ||
26 | const createModal = () => { | 26 | const createModal = () => { |
27 | const franzModal = document.createElement('div'); | 27 | const modalDialog = document.createElement('div'); |
28 | franzModal.setAttribute('id', 'franz-modal'); | 28 | modalDialog.setAttribute('id', 'franz-modal'); |
29 | franzModal.innerHTML = '<div class="modal-content"><span class="close">×</span><p></p></div>'; | 29 | modalDialog.innerHTML = '<div class="modal-content"><span class="close">×</span><p></p></div>'; |
30 | franzModal.querySelector('.close').addEventListener('click', hideModal); | 30 | modalDialog.querySelector('.close').addEventListener('click', hideModal); |
31 | 31 | ||
32 | return franzModal; | 32 | return modalDialog; |
33 | }; | 33 | }; |
34 | 34 | ||
35 | window.alert = showModal; | 35 | window.alert = showModal; |