From c548d0e216b4fb2afd52d87a007e8bf7fd12f0d8 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 21 Jan 2020 13:19:06 -0500 Subject: [PATCH] Add ability to dynamically load a different bundle in IE11 --- dist/index.html | 106 +++++++++++++++++++++++++++--------------------- dist/land.html | 15 +++---- index.html | 103 +++++++++++++++++++++++++++------------------- 3 files changed, 130 insertions(+), 94 deletions(-) diff --git a/dist/index.html b/dist/index.html index c4f2150b0..6061e59e8 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,54 +1,68 @@ - - - iD - - + + + iD + + + + + + - - - - + +
- - - - - -
- - + + function checkScript() { + if (typeof iD === 'undefined' || !iD.utilDetect().support) { + container.innerHTML = 'Sorry, your browser is not currently supported. Please use Potlatch 2 to edit the map.'; + container.className = 'unsupported'; + + } else { + var context = iD.coreContext(); + + // disable boundaries (unless we have an explicit disable_features list) + var q = iD.utilStringQs(window.location.hash.substring(1)); + if (!q.hasOwnProperty('disable_features')) { + context.features().disable('boundaries'); + } + + context.ui()(container, function() { + context.container().select('#about-list') + .insert('li', '.user-list') + .attr('class', 'source-switch') + .call(iD.uiSourceSwitch(context) + .keys([{ + 'urlroot': 'https://www.openstreetmap.org', + 'oauth_consumer_key': '5A043yRSEugj4DJ5TljuapfnrflWDte8jTOcWLlT', + 'oauth_secret': 'aB3jKq1TRsCOUrfOIZ6oQMEDmv2ptV76PA54NGLL' + }, { + 'urlroot': 'https://api06.dev.openstreetmap.org', + 'oauth_consumer_key': 'zwQZFivccHkLs3a8Rq5CoS412fE5aPCXDw9DZj7R', + 'oauth_secret': 'aMnOOCwExO2XYtRVWJ1bI9QOdqh1cay2UgpbhA6p' + } + ]) + ); + }); + } + } + + diff --git a/dist/land.html b/dist/land.html index 88db9f1e4..151f58c80 100644 --- a/dist/land.html +++ b/dist/land.html @@ -1,9 +1,10 @@ - - - - + + + + + diff --git a/index.html b/index.html index 0fd5ff472..bb6c0d02d 100644 --- a/index.html +++ b/index.html @@ -1,47 +1,68 @@ - - - iD - - - - - - - -
- - + } + +