From c6c48ef664df1443932d3df20a95790020bddd3f Mon Sep 17 00:00:00 2001 From: Kim - DG9VH Date: Tue, 3 Nov 2020 17:17:58 +0100 Subject: [PATCH] Linking to QRZ.com if wanted use js/config.js to switch on (1) or off (0) --- html/js/config.js | 1 + html/js/functions.js | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 html/js/config.js diff --git a/html/js/config.js b/html/js/config.js new file mode 100644 index 0000000..38783b9 --- /dev/null +++ b/html/js/config.js @@ -0,0 +1 @@ +var qrz = 1; diff --git a/html/js/functions.js b/html/js/functions.js index d939fac..0824bfc 100644 --- a/html/js/functions.js +++ b/html/js/functions.js @@ -11,7 +11,12 @@ function getMode(logline) { } function getCallsign(logline) { - return logline.substring(logline.indexOf("from") + 5, logline.indexOf("to")); + callsign = logline.substring(logline.indexOf("from") + 5, logline.indexOf("to")).trim(); + if (qrz == 1) { + return '' + callsign + ''; + } else { + return callsign; + } } function getTarget(logline) { @@ -63,7 +68,8 @@ function getBER(logline) { function getAddToQSO(logline) { - retval = '
'; + callsign = logline.substring(logline.indexOf("from") + 5, logline.indexOf("to")).trim(); + retval = '
'; return retval; }