mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Find n-fer activation references from POTA spot comments. Closes #53
This commit is contained in:
@@ -148,22 +148,16 @@ function updateTable() {
|
||||
|
||||
// Format sig_refs
|
||||
var sig_refs = "";
|
||||
if (s["sig_refs"] && s["sig_refs_urls"] && s["sig_refs"].length == s["sig_refs_urls"].length) {
|
||||
if (s["sig_refs"] && s["sig_refs_urls"] && s["sig_refs"].length == s["sig_refs_urls"].length && s["sig_refs"].length == s["sig_refs_names"].length) {
|
||||
items = s["sig_refs"].map(s => `<span class='nowrap'>${s}</span>`)
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
items[i] = `<a href='${s["sig_refs_urls"][i]}' target='_new' class='sig-ref-link'>${items[i]}</a>`
|
||||
items[i] = `<a href='${s["sig_refs_urls"][i]}' title='${s["sig_refs_names"][i]}' target='_new' class='sig-ref-link'>${items[i]}</a>`
|
||||
}
|
||||
sig_refs = items.join(", ");
|
||||
} else if (s["sig_refs"]) {
|
||||
sig_refs = s["sig_refs"].map(s => `<span class='nowrap'>${s}</span>`).join(", ");
|
||||
}
|
||||
|
||||
// Format sig_refs title
|
||||
var sig_refs_title_string = "";
|
||||
if (s["sig_refs_names"]) {
|
||||
sig_refs_title_string = " title=\"" + s["sig_refs_names"].join(", ") + "\"";
|
||||
}
|
||||
|
||||
// Format DE flag
|
||||
var de_flag = "<i class='fa-solid fa-circle-question'></i>";
|
||||
if (s["de_flag"] && s["de_flag"] != null && s["de_flag"] != "") {
|
||||
@@ -209,7 +203,7 @@ function updateTable() {
|
||||
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid fa-${s["icon"]}'></i></span> ${typeText}</td>`);
|
||||
}
|
||||
if (showRef) {
|
||||
$tr.append(`<td class='hideonmobile'><span ${sig_refs_title_string}>${sig_refs}</span></td>`);
|
||||
$tr.append(`<td class='hideonmobile'>${sig_refs}</td>`);
|
||||
}
|
||||
if (showDE) {
|
||||
$tr.append(`<td class='nowrap hideonmobile'><span class='flag-wrapper' title='${de_country}'>${de_flag}</span>${de_call}</td>`);
|
||||
|
||||
Reference in New Issue
Block a user