1
0
mirror of https://github.com/MailHops/mailhops-plugin.git synced 2025-05-28 03:40:10 -07:00

js/mailhops_details.js: fix inverted logic for links containing a comma character.

Actually, links containing a comma character are just multiple links,
the current code wants to fetch the first element and drop all others.

We'll change this at a later time, but for now, just fix the bug at
hand.
This commit is contained in:
Mihai Moldovan 2024-04-17 08:32:57 +02:00
parent 28f89f5228
commit 08f3706432

View File

@ -136,7 +136,7 @@ function updateContent(msg, noauth) {
auth += '<label class="tiny ui label ' + msg.message.auth[a].color + '"><img src="' + msg.message.auth[a].icon + '"/>' + msg.message.auth[a].type + ' ' + msg.message.auth[a].copy + '</label>';
}
else if (msg.message.auth[a].link) {
if (msg.message.auth[a].link.indexOf(',')) {
if (-1 !== msg.message.auth[a].link.indexOf(',')) {
auth += '<a class="tiny ui label ' + msg.message.auth[a].color + '" href="'+msg.message.auth[a].link.substr(0,msg.message.auth[a].link.indexOf(','))+'" target="_blank">' + msg.message.auth[a].type + '</a>';
}
else {