From 554fe88942135583404ddf8c1a97f342287cea5a Mon Sep 17 00:00:00 2001 From: 0neGal Date: Fri, 20 Dec 2024 18:33:38 +0100 Subject: minor syntax changes --- src/app/js/request.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/app') diff --git a/src/app/js/request.js b/src/app/js/request.js index aeea35a..cc73f1b 100644 --- a/src/app/js/request.js +++ b/src/app/js/request.js @@ -1,15 +1,15 @@ const ipcRenderer = require("electron").ipcRenderer; -const updateOnlineStatus = () => { +let update_status = () => { // show a toast message if no Internet connection has been detected. - if (!navigator.onLine) { + if (! navigator.onLine) { ipcRenderer.send("no-internet"); } } -window.addEventListener('online', updateOnlineStatus); -window.addEventListener('offline', updateOnlineStatus); -updateOnlineStatus(); +window.addEventListener("online", update_status); +window.addEventListener("offline", update_status); +update_status(); // invokes `requests.get()` from `src/modules/requests.js` through the // main process, and returns the output -- cgit v1.2.3