From 1356d62c0d79e8ba1eaefdc0456b6109f90528e2 Mon Sep 17 00:00:00 2001 From: florisluiten Date: Tue, 28 Nov 2017 22:48:04 +0100 Subject: [PATCH] Add captions [only once] for easy searching (#83) * Added captions. This allows for easy searching in the README.md * Added captions. This allows for easy searching in HTML * Add the label just once, not after every change of radius. Fixed issue with the label being added multiple times --- radius.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/radius.html b/radius.html index b6567a72..e03e94ef 100644 --- a/radius.html +++ b/radius.html @@ -79,7 +79,10 @@ var urls = items.map(item => 'images/svg/' + item + '.svg'); var icons; Promise.all(urls.map(url => fetch(url).then(res => res.text()))).then(all => { - icons = all; + icons = all.map(icon => { + return icon + '' + icon.match(/aria-label\=\"(.*?)\"/)[1] + ''; + }); + render(range.value); });