aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/googlecalendar/webview-unsafe.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/googlecalendar/webview-unsafe.js')
-rw-r--r--recipes/googlecalendar/webview-unsafe.js8
1 files changed, 4 insertions, 4 deletions
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
12const showModal = text => { 12const 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
19const hideModal = () => { 19const 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 = () => {
26const createModal = () => { 26const 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">&times;</span><p></p></div>'; 30 '<div class="modal-content"><span class="close">&times;</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;
38modal = createModal(); 38modal = createModal();
39waitFor( 39waitFor(
40 () => document.body, 40 () => document.body,
41 () => document.body.appendChild(modal), 41 () => document.body.append(modal),
42); 42);
43document.addEventListener( 43document.addEventListener(
44 'keydown', 44 'keydown',