aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/googlecalendar
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-10-05 17:04:09 +0200
committerLibravatar GitHub <noreply@github.com>2021-10-05 17:04:09 +0200
commitd3841b766f9d37d557646003899f67525c5f755f (patch)
tree1bcab990c94f2b05678b7a83ffebe08298500f0b /recipes/googlecalendar
parentchore: repo maintenance (#732) (diff)
downloadferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.gz
ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.zst
ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.zip
chore: add eslint-plugin-unicorn (#733)
Diffstat (limited to 'recipes/googlecalendar')
-rw-r--r--recipes/googlecalendar/index.js3
-rw-r--r--recipes/googlecalendar/webview-unsafe.js8
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 @@
1module.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
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',