From d3841b766f9d37d557646003899f67525c5f755f Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Tue, 5 Oct 2021 17:04:09 +0200 Subject: chore: add eslint-plugin-unicorn (#733) --- recipes/googlecalendar/index.js | 3 +-- recipes/googlecalendar/webview-unsafe.js | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'recipes/googlecalendar') 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 @@ -module.exports = Ferdi => class GoogleCalendar extends Ferdi { -}; +module.exports = Ferdi => class GoogleCalendar extends Ferdi {}; 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) => { }; const showModal = text => { - modal.querySelector('p').innerHTML = text; + modal.querySelector('p').textContent = text; updates += 1; window.ferdi.setBadge(updates); modal.classList.add('open'); }; const hideModal = () => { - modal.querySelector('p').innerHTML = ''; + modal.querySelector('p').textContent = ''; updates -= 1; window.ferdi.setBadge(updates); modal.classList.remove('open'); @@ -26,7 +26,7 @@ const hideModal = () => { const createModal = () => { const modalDialog = document.createElement('div'); modalDialog.setAttribute('id', 'franz-modal'); - modalDialog.innerHTML = + modalDialog.textContent = ''; modalDialog.querySelector('.close').addEventListener('click', hideModal); @@ -38,7 +38,7 @@ window.alert = showModal; modal = createModal(); waitFor( () => document.body, - () => document.body.appendChild(modal), + () => document.body.append(modal), ); document.addEventListener( 'keydown', -- cgit v1.2.3-70-g09d2