diff options
author | 0neGal <mail@0negal.com> | 2024-12-20 18:33:38 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2024-12-20 18:33:38 +0100 |
commit | 554fe88942135583404ddf8c1a97f342287cea5a (patch) | |
tree | ce59d5f05ab18e89f4d285bb61080589cea111ad /src/app/js/request.js | |
parent | 4db50da2c75968f8c5ca6804e332da8de401a3e0 (diff) | |
download | Viper-554fe88942135583404ddf8c1a97f342287cea5a.tar.gz Viper-554fe88942135583404ddf8c1a97f342287cea5a.zip |
minor syntax changes
Diffstat (limited to 'src/app/js/request.js')
-rw-r--r-- | src/app/js/request.js | 10 |
1 files changed, 5 insertions, 5 deletions
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 |