From edde2fbc91b4a41efa08819d3d172c132d206858 Mon Sep 17 00:00:00 2001 From: DJ2LS Date: Wed, 27 Sep 2023 09:24:26 +0000 Subject: [PATCH] Prettified Code! --- gui/preload-chat.js | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/gui/preload-chat.js b/gui/preload-chat.js index ed876a4f..a7cf6d18 100644 --- a/gui/preload-chat.js +++ b/gui/preload-chat.js @@ -80,8 +80,6 @@ PouchDB.plugin(require("pouchdb-find")); //PouchDB.plugin(require('pouchdb-replication')); PouchDB.plugin(require("pouchdb-upsert")); - - var db = new PouchDB(chatDB); var users = new PouchDB(userDB); @@ -1066,7 +1064,6 @@ update_chat = function (obj) { var attempt = obj.attempt; } - // add percent and bytes per minute if not existing //console.log(obj.percent) if (typeof obj.percent == "undefined") { @@ -1395,17 +1392,16 @@ update_chat = function (obj) { showOsPopUp("Message received from " + obj.dxcallsign, obj.msg); } - - // check if message is signed or not for adjusting icon - if(typeof obj.hmac_signed !== "undefined" && obj.hmac_signed !== "False"){ - console.log(hmac_signed) - var hmac_signed = ''; - } else { - - var hmac_signed = ''; - - } - + // check if message is signed or not for adjusting icon + if ( + typeof obj.hmac_signed !== "undefined" && + obj.hmac_signed !== "False" + ) { + console.log(hmac_signed); + var hmac_signed = ''; + } else { + var hmac_signed = ''; + } var new_message = `
@@ -1423,13 +1419,9 @@ update_chat = function (obj) {

- + - ${hmac_signed} + ${hmac_signed}