From d8950a7d52c7a4d99333ffec9962c84d3c4b96f6 Mon Sep 17 00:00:00 2001 From: Marat Fayzullin Date: Fri, 5 Apr 2024 21:07:09 -0400 Subject: [PATCH] Linkified JS8 callsigns. --- CHANGELOG.md | 4 ++-- debian/changelog | 4 ++-- htdocs/lib/Js8Threads.js | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b20ce5c4..84b7bd23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,10 @@ **1.2.54** - Made FT8/JS8/WSPR/etc. messages show in monospace font. -- Added ability to click on FT8/etc. callsigns. +- Added ability to click on FT8/JS8/etc. callsigns. - Added columns to the time displays. - Fixed locators not aging when updated. - Fixed race condition between move-profile requests. -- Now defaulting all fields to kHz in new profiles. +- Now defaulting all new profile fields to kHz. **1.2.53** - Added ability to reorder profiles in the Settings. diff --git a/debian/changelog b/debian/changelog index b4ff80d7..3c8511a7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,11 @@ openwebrx (1.2.54) bullseye jammy; urgency=low * Made FT8/JS8/WSPR/etc. messages show in monospace font. - * Added ability to click on FT8/etc. callsigns. + * Added ability to click on FT8/JS8/etc. callsigns. * Added columns to the time displays. * Fixed locators not aging when updated. * Fixed race condition between move-profile requests. - * Now defaulting all fields to kHz in new profiles. + * Now defaulting all new profile fields to kHz. -- Marat Fayzullin Mon, 8 Apr 2024 16:12:00 +0000 diff --git a/htdocs/lib/Js8Threads.js b/htdocs/lib/Js8Threads.js index 5b9e61a8..9396b79d 100644 --- a/htdocs/lib/Js8Threads.js +++ b/htdocs/lib/Js8Threads.js @@ -44,7 +44,8 @@ Js8Thread.prototype.renderMessages = function() { } else if (i === 0 || msg.timestamp - this.messages[i - 1].timestamp > this.getMessageDuration()) { res.push(' ... '); } - res.push(msg.msg); + var matches = msg.msg.match(/^([A-Z0-9]+)(:.*)$/); + res.push(matches? Utils.linkifyCallsign(matches[1]) + matches[2] : msg.msg); if (msg.thread_type & 2) { res.push(' ]'); } else if (i === this.messages.length -1) {