1
0
Fork 0
Kim Huebel 4 years ago
parent ea48f75ff6
commit e7c6823a6e

@ -24,3 +24,7 @@ var defaultTab = "LastHeardTab";
// Set displayed timezone and timestamp to timezone of browser if 1, else use UTC for displaying // Set displayed timezone and timestamp to timezone of browser if 1, else use UTC for displaying
var useClientTimezone = 1; var useClientTimezone = 1;
// Show link to BrandMeister-LastHeard on TG if 1, else no link
var showBMTGLink = 1;

@ -77,7 +77,7 @@ function getCallsign(logline) {
// 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 // 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
// M: 2020-11-07 15:41:22.601 DMR Slot 1, received network late entry from DO5DC to TG 262810 // M: 2020-11-07 15:41:22.601 DMR Slot 1, received network late entry from DO5DC to TG 262810
function getTarget(logline) { function getRawTarget(logline) {
if(logline.indexOf("at") > 0 && logline.indexOf("late entry") < 0 ) { if(logline.indexOf("at") > 0 && logline.indexOf("late entry") < 0 ) {
return logline.substring(logline.indexOf("to") + 3, logline.lastIndexOf("at")); return logline.substring(logline.indexOf("to") + 3, logline.lastIndexOf("at"));
} else { } else {
@ -89,6 +89,18 @@ function getTarget(logline) {
} }
} }
function getTarget(logline) {
target = getRawTarget(logline);
if (showBMTGLink && getMode(logline).startsWith("DMR")) {
bmlink = "https://brandmeister.network/?page=lh&DestinationID=";
linkTarget = target.substring(3);
link = '<a href="' + bmlink + linkTarget + '" target="_new">' + target + '</a>';
return link;
} else {
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(" "));

Loading…
Cancel
Save