From 95df3522a15631abc51a4295cae0ea401a8d4e1e Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Tue, 14 Sep 2021 19:58:52 +0200 Subject: feat: add eslint-plugin-unicorn (#1936) --- src/features/todos/preload.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/features/todos/preload.js') diff --git a/src/features/todos/preload.js b/src/features/todos/preload.js index 9bd76a704..3b86ddbc5 100644 --- a/src/features/todos/preload.js +++ b/src/features/todos/preload.js @@ -7,7 +7,9 @@ debug('Preloading Todos Webview'); let hostMessageListener = ({ action }) => { switch (action) { - case 'todos:initialize-as-service': ipcRenderer.sendToHost('hello'); break; + case 'todos:initialize-as-service': + ipcRenderer.sendToHost('hello'); + break; default: } }; @@ -15,7 +17,9 @@ let hostMessageListener = ({ action }) => { window.ferdi = { onInitialize(ipcHostMessageListener) { hostMessageListener = ipcHostMessageListener; - ipcRenderer.sendToHost(IPC.TODOS_CLIENT_CHANNEL, { action: 'todos:initialized' }); + ipcRenderer.sendToHost(IPC.TODOS_CLIENT_CHANNEL, { + action: 'todos:initialized', + }); }, sendToHost(message) { ipcRenderer.sendToHost(IPC.TODOS_CLIENT_CHANNEL, message); @@ -30,7 +34,7 @@ ipcRenderer.on(IPC.TODOS_HOST_CHANNEL, (event, message) => { if (window.location.href === 'https://app.franztodos.com/login/') { // Insert info element informing about Franz accounts const infoElement = document.createElement('p'); - infoElement.innerText = `You are using Franz's official Todo Service. + infoElement.textContent = `You are using Franz's official Todo Service. This service will only work with accounts registered with Franz - no Ferdi accounts will work here! If you do not have a Franz account you can change the Todo service by going into Ferdi's settings and changing the "Todo server". You can choose any service as this Todo server, e.g. Todoist or Apple Notes.`; @@ -42,7 +46,7 @@ You can choose any service as this Todo server, e.g. Todoist or Apple Notes.`; const textElement = document.querySelector('p'); if (textElement) { clearInterval(waitForReact); - textElement.parentElement.insertBefore(infoElement, textElement); + textElement.parentElement?.insertBefore(infoElement, textElement); } else { numChecks += 1; -- cgit v1.2.3-54-g00ecf