diff options
Diffstat (limited to 'recipes/googlecalendar')
-rw-r--r-- | recipes/googlecalendar/index.js | 3 | ||||
-rw-r--r-- | recipes/googlecalendar/webview-unsafe.js | 8 |
2 files changed, 5 insertions, 6 deletions
diff --git a/recipes/googlecalendar/index.js b/recipes/googlecalendar/index.js index 553d5ef..e84eca2 100644 --- a/recipes/googlecalendar/index.js +++ b/recipes/googlecalendar/index.js | |||
@@ -1,2 +1 @@ | |||
1 | module.exports = Ferdi => class GoogleCalendar extends Ferdi { | module.exports = Ferdi => class GoogleCalendar extends Ferdi {}; | |
2 | }; | ||
diff --git a/recipes/googlecalendar/webview-unsafe.js b/recipes/googlecalendar/webview-unsafe.js index 54a7338..141d3bc 100644 --- a/recipes/googlecalendar/webview-unsafe.js +++ b/recipes/googlecalendar/webview-unsafe.js | |||
@@ -10,14 +10,14 @@ const waitFor = (condition, callback) => { | |||
10 | }; | 10 | }; |
11 | 11 | ||
12 | const showModal = text => { | 12 | const showModal = text => { |
13 | modal.querySelector('p').innerHTML = text; | 13 | modal.querySelector('p').textContent = text; |
14 | updates += 1; | 14 | updates += 1; |
15 | window.ferdi.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').textContent = ''; |
21 | updates -= 1; | 21 | updates -= 1; |
22 | window.ferdi.setBadge(updates); | 22 | window.ferdi.setBadge(updates); |
23 | modal.classList.remove('open'); | 23 | modal.classList.remove('open'); |
@@ -26,7 +26,7 @@ const hideModal = () => { | |||
26 | const createModal = () => { | 26 | const createModal = () => { |
27 | const modalDialog = document.createElement('div'); | 27 | const modalDialog = document.createElement('div'); |
28 | modalDialog.setAttribute('id', 'franz-modal'); | 28 | modalDialog.setAttribute('id', 'franz-modal'); |
29 | modalDialog.innerHTML = | 29 | modalDialog.textContent = |
30 | '<div class="modal-content"><span class="close">×</span><p></p></div>'; | 30 | '<div class="modal-content"><span class="close">×</span><p></p></div>'; |
31 | modalDialog.querySelector('.close').addEventListener('click', hideModal); | 31 | modalDialog.querySelector('.close').addEventListener('click', hideModal); |
32 | 32 | ||
@@ -38,7 +38,7 @@ window.alert = showModal; | |||
38 | modal = createModal(); | 38 | modal = createModal(); |
39 | waitFor( | 39 | waitFor( |
40 | () => document.body, | 40 | () => document.body, |
41 | () => document.body.appendChild(modal), | 41 | () => document.body.append(modal), |
42 | ); | 42 | ); |
43 | document.addEventListener( | 43 | document.addEventListener( |
44 | 'keydown', | 44 | 'keydown', |