From 9de2d5c94fdd983327d458e53b5e8b235cd6d9b1 Mon Sep 17 00:00:00 2001
From: Robert Metcalf <metcalfr@cardiff.ac.uk>
Date: Tue, 30 Nov 2021 15:53:17 +0000
Subject: [PATCH] enable noscript message and open website in new tab

---
 static/scripts/map.js | 2 +-
 templates/map.html    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/static/scripts/map.js b/static/scripts/map.js
index 3ca7fbd..b914908 100644
--- a/static/scripts/map.js
+++ b/static/scripts/map.js
@@ -12,7 +12,7 @@ for (let workspace of mapData) {
 			escapeHTML(workspace.phoneNumber)
 		}</a></div><div>Email: <a href="mailto:${ escapeHTML(workspace.email) }">${
 			escapeHTML(workspace.email)
-		}</a></div><div>Website: <a href="${ escapeHTML(workspace.website) }">${
+		}</a></div><div>Website: <a href="${ escapeHTML(workspace.website) }" target="_blank">${
 			escapeHTML(workspace.website)
 		}</a></div><div>${ escapeHTML(workspace.address) }</div></div>`);
 }
diff --git a/templates/map.html b/templates/map.html
index af4c384..510eda4 100644
--- a/templates/map.html
+++ b/templates/map.html
@@ -4,10 +4,10 @@
 <link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
 	integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
 	crossorigin=""/>
-	<!-- Make sure you put this AFTER Leaflet's CSS -->
 <script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
 	integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
 	crossorigin=""></script>
+<noscript>JavaScript must be supported and enabled in the browser to support interactive maps!</noscript>
 <script>var mapData = {{ json|safe }};</script>
 <div id="map"></div>
 <script src="/static/scripts/map.js"></script>
-- 
GitLab