diff --git a/js/mailhops_details.js b/js/mailhops_details.js
index 07313a4..63f9e48 100644
--- a/js/mailhops_details.js
+++ b/js/mailhops_details.js
@@ -57,6 +57,7 @@ function updateContent(msg, noauth) {
const sender = msg.message.sender || null;
const unit = msg.options.unit || "mi";
const theme = msg.options.theme || "light";
+ const debug = msg.options.debug || false;
let client = null;
let items = [];
@@ -138,15 +139,24 @@ function updateContent(msg, noauth) {
if (!noauth && msg.message.auth.length) {
for (var a = 0; a < msg.message.auth.length; a++){
if (msg.message.auth[a].icon) {
- auth += '';
+ var add = '';
+ if (debug) {
+ console.log("adding to auth (type icon): '" + add + "'");
+ }
+ auth += add;
}
else if (msg.message.auth[a].link) {
- if (-1 !== msg.message.auth[a].link.indexOf(',')) {
- auth += '' + msg.message.auth[a].type + '';
+ var add = '';
+ if (-1 != msg.message.auth[a].link.indexOf(',')) {
+ add = '' + msg.message.auth[a].type + '';
}
else {
- auth += '' + msg.message.auth[a].type + '';
+ add = '' + msg.message.auth[a].type + '';
}
+ if (debug) {
+ console.log("adding to auth (type link): '" + add + "'");
+ }
+ auth += add;
}
}
}