From bcf2cb1703e136eaac727dfd5ca6fb370b1f7929 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Sat, 8 May 2021 10:45:43 +0200 Subject: [PATCH] Open links in new tab --- static/js/map.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/js/map.js b/static/js/map.js index 151c31a..7516b7a 100644 --- a/static/js/map.js +++ b/static/js/map.js @@ -299,12 +299,12 @@ function load_wikidata_items() { if (item.description) { popup += `
description: ${item.description}` } - if (item.isa_list) { + if (item.isa_list && item.isa_list.length) { popup += '
item type' for (const [index, isa_qid] of item.isa_list.entries()) { var isa_url = 'https://www.wikidata.org/wiki/' + isa_qid; var isa_label = isa_labels[isa_qid]; - popup += `
${isa_label} (${isa_qid})`; + popup += `
${isa_label} (${isa_qid})`; } } if (item.image_list && item.image_list.length) { @@ -347,7 +347,7 @@ function load_wikidata_items() { ${osm.name}: ${osm.identifier}
- Wikidata tag: ${qid} + Wikidata tag: ${qid}

` marker.bindPopup(popup); marker.addTo(group);