Bugfixing target-linking...
now we make a difference between callsigns (to QRZ.com) and TGs (to BM)...
This commit is contained in:
parent
b471bdbc59
commit
844a54487e
2 changed files with 36 additions and 2 deletions
|
@ -121,6 +121,40 @@ function getRawTarget(logline) {
|
||||||
|
|
||||||
function getTarget(logline) {
|
function getTarget(logline) {
|
||||||
target = getRawTarget(logline);
|
target = getRawTarget(logline);
|
||||||
|
if (showBMTGLink && getMode(logline).startsWith("DMR")) {
|
||||||
|
bmlink = "https://brandmeister.network/?page=lh&DestinationID=";
|
||||||
|
linkTarget = target;
|
||||||
|
if (target.indexOf("TG") == 0) {
|
||||||
|
linkTarget = target.substring(3);
|
||||||
|
}
|
||||||
|
if (isNaN(linkTarget)) {
|
||||||
|
name = "";
|
||||||
|
if (target.indexOf("$") > 0) {
|
||||||
|
name = target.substring(target.indexOf("$") + 1, target.lastIndexOf("$"));
|
||||||
|
target = target.substring(0, target.indexOf("$"));
|
||||||
|
}
|
||||||
|
if (qrz == 1 && isNaN(target) && !qrz_blacklist.includes(target)) {
|
||||||
|
if (name != "") {
|
||||||
|
return '<div class=\"tooltip2\"><a target="_new" href="https://qrz.com/db/' + target + '">' + target + '</a><span class=\"tooltip2text\">Name:<br>' + name + '</span></div>';
|
||||||
|
} else {
|
||||||
|
return '<a target="_new" href="https://qrz.com/db/' + target + '">' + target + '</a>';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (name != "") {
|
||||||
|
return '<div class=\"tooltip2\">' + target + '<span class=\"tooltip2text\">Name:<br>' + name + '</span></div>';
|
||||||
|
} else {
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
link = '<a href="' + bmlink + linkTarget + '" target="_new">' + target + '</a>';
|
||||||
|
return link;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
if (showBMTGLink && getMode(logline).startsWith("DMR")) {
|
if (showBMTGLink && getMode(logline).startsWith("DMR")) {
|
||||||
bmlink = "https://brandmeister.network/?page=lh&DestinationID=";
|
bmlink = "https://brandmeister.network/?page=lh&DestinationID=";
|
||||||
linkTarget = target.substring(3);
|
linkTarget = target.substring(3);
|
||||||
|
@ -130,7 +164,7 @@ function getTarget(logline) {
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
function getSource(logline) {
|
function getSource(logline) {
|
||||||
val = logline.substring(logline.indexOf("received") + 9);
|
val = logline.substring(logline.indexOf("received") + 9);
|
||||||
val = val.substring(0, val.indexOf(" "));
|
val = val.substring(0, val.indexOf(" "));
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
var dashboard_version = "2021-02-04 22:58:20";
|
var dashboard_version = "2021-02-06 10:34:42";
|
||||||
|
|
Loading…
Reference in a new issue