diff --git a/htdocs/lib/MessagePanel.js b/htdocs/lib/MessagePanel.js index aff68b1b..6cee4e71 100644 --- a/htdocs/lib/MessagePanel.js +++ b/htdocs/lib/MessagePanel.js @@ -56,6 +56,12 @@ MessagePanel.prototype.scrollToBottom = function() { $t.scrollTop($t[0].scrollHeight); }; +MessagePanel.prototype.linkToMap = function(id, contents = null, attrs = "") { + return '' + + (contents!=null? contents : id) + ''; +}; + function WsjtMessagePanel(el) { MessagePanel.call(this, el); this.initClearTimer(); @@ -212,7 +218,7 @@ PacketMessagePanel.prototype.pushMessage = function(msg) { 'style="' + stylesToString(styles) + '"' ].join(' '); if (msg.lat && msg.lon) { - link = '' + overlay + ''; + link = this.linkToMap(source, overlay, attrs); } else { link = '