aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/googlecalendar/webview-unsafe.js
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-27 18:13:24 +0530
committerLibravatar GitHub <noreply@github.com>2021-08-27 18:13:24 +0530
commit155c4b832281348c16be1f4ef667e6e23dbf1bd8 (patch)
treed144e2de2e6c7fb2e334246e8a4aecdbeb08ef8d /recipes/googlecalendar/webview-unsafe.js
parentdocs: fixed template file for creating recipe. (diff)
downloadferdium-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.js14
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) => {
12const showModal = text => { 12const 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
19const hideModal = () => { 19const 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
26const createModal = () => { 26const 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">&times;</span><p></p></div>'; 29 modalDialog.innerHTML = '<div class="modal-content"><span class="close">&times;</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
35window.alert = showModal; 35window.alert = showModal;