Files
iD/dist/index.html
Bryan Housel 5040be45e9 Sync up RapiD and iD esbuild config (#8776)
* Sync up RapiD and iD esbuild config scripts

* Remove uglify too

* Remove babel/preset-react

* Just have `npm run start` start a modern build, remove `quickstart`

* Better setup for modern/legacy build
- much simpler babel config
- separate entry points for modern and legacy (ie11/phantom)
- explicitly import 'core-js' and 'regenerator-runtime' instead of using deprecated 'babel/polyfill' plugin
- still need 'core-js-bundle' for the test/index.html, so Mocha/PhantomJS combo will work.

* Revert "Better setup for modern/legacy build"

This reverts commit 4ce17defa8a3c6f4b3a9168bcd672235bfc651be.

Co-authored-by: Milos Brzakovic (E-Search) <mbrzakovic@microsoft.com>
2022-01-17 14:18:27 +01:00

71 lines
2.5 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>iD</title>
<link rel='stylesheet' href='iD.css'>
<link rel='icon' type='image/png' href='data:image/png;base64,iVBORw0KGgo='>
<meta name='viewport' content='width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no'/>
<meta name='apple-mobile-web-app-capable' content='yes'/>
<meta name='apple-mobile-web-app-status-bar-style' content='black-translucent'/>
<style type='text/css'>
/* apply document-level styling to standalone iD only */
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
/* disable elastic page bounce upon scroll */
overflow: hidden;
}
</style>
</head>
<body>
<div id='id-container'></div>
<script>
var container = document.getElementById('id-container');
var newScript = document.createElement('script');
newScript.type = 'text/javascript';
newScript.onload = checkScript;
newScript.onerror = checkScript;
var isIE11 = !!(navigator.userAgent.match(/Trident/) && !navigator.userAgent.match(/MSIE/));
newScript.src = isIE11 ? 'iD.legacy.min.js' : 'iD.min.js';
document.getElementsByTagName('head')[0].appendChild(newScript);
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.style.padding = '20px';
} else {
var context = iD.coreContext()
.assetPath('')
.apiConnections([
{
'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'
}
])
.containerNode(container);
context.init();
// disable boundaries (unless we have an explicit disable_features list)
var q = iD.utilStringQs(window.location.hash);
if (!q.hasOwnProperty('disable_features')) {
context.features().disable('boundaries');
}
}
}
</script>
</body>
</html>