From: marc tobias Date: Fri, 2 Mar 2018 10:44:32 +0000 (+0100) Subject: add polyfill for URLSearchParams X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/commitdiff_plain/d7b0d69fe2317997ba899b473dedea6c765bf691 add polyfill for URLSearchParams --- diff --git a/TODO.md b/TODO.md index a445427..f83dc2e 100644 --- a/TODO.md +++ b/TODO.md @@ -5,7 +5,7 @@ ## Essential * JS error on http://localhost:8000/reverse.html?format=html&lat=51.72702815704774&lon=8.701171874999998&zoom= -* need polyfill for URLSearchParams https://caniuse.com/#feat=urlsearchparams +* test in MSIE https://github.com/WebReflection/url-search-params * Nominatim backend API * need /status to support &format=json * need /details to support &format=json diff --git a/src/layout.html b/src/layout.html index de2fe7d..3fef5dd 100644 --- a/src/layout.html +++ b/src/layout.html @@ -107,7 +107,7 @@ - + diff --git a/src/vendor/js/url-search-params.js b/src/vendor/js/url-search-params.js new file mode 100644 index 0000000..21335d2 --- /dev/null +++ b/src/vendor/js/url-search-params.js @@ -0,0 +1,2 @@ +/*! (C) Andrea Giammarchi - Mit Style License */ +var URLSearchParams=URLSearchParams||function(){"use strict";function URLSearchParams(query){var index,key,value,pairs,i,length,dict=Object.create(null);this[secret]=dict;if(!query)return;if(typeof query==="string"){if(query.charAt(0)==="?"){query=query.slice(1)}for(pairs=query.split("&"),i=0,length=pairs.length;i