-
Notifications
You must be signed in to change notification settings - Fork 0
/
rawgit.html
44 lines (40 loc) · 1.89 KB
/
rawgit.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<html>
<head>
<script src="built/require.js"></script>
<link rel="stylesheet" type="text/css" href="app.css" />
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.4.3/css/ol.css" />
</head>
<body>
<app />
<script>
var globals = {};
(function () {
function getParameterByName(name, url = window.location.href) {
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
let run = getParameterByName("run") || "index";
let debug = getParameterByName("debug") === "1";
requirejs.config({
// module name mapped to CDN url
paths: {
"react": debug ? "https://unpkg.com/react@16.2.0/umd/react.development" : "https://unpkg.com/react@16.2.0/umd/react.production.min",
"react-dom": debug ? "https://unpkg.com/react-dom@16.2.0/umd/react-dom.development" : "https://unpkg.com/react-dom@16.2.0/umd/react-dom.production.min",
"material-ui": debug ? "https://unpkg.com/material-ui@1.0.0-beta.24/umd/material-ui.development" : "https://unpkg.com/material-ui@1.0.0-beta.24/umd/material-ui.production.min",
"turf": debug ? "https://npmcdn.com/@turf/turf@5.1.6/turf" : "https://npmcdn.com/@turf/turf@5.1.6/turf.min"
},
deps: ["built/index"],
callback: function () {
globals.debug = debug;
require([run], function (go) { go() });
}
});
})();
</script>
</body>
</html>