Now linkifying all callsigns in FT8/FT4 data.

This commit is contained in:
Marat Fayzullin 2024-04-22 22:25:39 -04:00
parent 5d313fe5e4
commit 93bfb2e65c
1 changed files with 7 additions and 5 deletions

View File

@ -91,12 +91,14 @@ WsjtMessagePanel.prototype.pushMessage = function(msg) {
var matches; var matches;
if (this.qsoModes.indexOf(msg['mode']) >= 0) { if (this.qsoModes.indexOf(msg['mode']) >= 0) {
matches = linkedmsg.match(/(.*)\s([A-Z0-9]+)\s([A-R]{2}[0-9]{2})$/); matches = linkedmsg.match(/^(.*?)([A-Z0-9]+)\s([A-Z0-9]+)\s(([A-R]{2}[0-9]{2})|(R?[+\-]?[0-9]{2})|(RRR))$/);
if (matches) { if (matches) {
var locator = matches[3]!=='RR73'? var destination = matches[2]!=='CQ' && matches[2]!=='DX'?
Utils.linkifyLocator(matches[3]) : matches[3]; Utils.linkifyCallsign(matches[2]) : matches[2];
linkedmsg = Utils.htmlEscape(matches[1]) var locator = matches[5] && matches[5]!=='RR73'?
+ ' ' + Utils.linkifyCallsign(matches[2]) Utils.linkifyLocator(matches[5]) : matches[4];
linkedmsg = Utils.htmlEscape(matches[1]) + destination
+ ' ' + Utils.linkifyCallsign(matches[3])
+ ' ' + locator; + ' ' + locator;
} else { } else {
linkedmsg = Utils.htmlEscape(linkedmsg); linkedmsg = Utils.htmlEscape(linkedmsg);