1 | <!DOCTYPE html>
|
2 |
|
3 | <html>
|
4 | <head>
|
5 | <meta charset="utf-8">
|
6 | |
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | <meta http-equiv="X-UA-Compatible" content="chrome=1">
|
30 | <title>Remix - Ethereum IDE</title>
|
31 | <link rel="stylesheet" id="theme-link"/>
|
32 | <link rel="stylesheet" href="assets/css/pygment_trac.css">
|
33 | <link rel="icon" type="x-icon" href="icon.png">
|
34 | <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
35 | </head>
|
36 | <body>
|
37 | <script>
|
38 | function urlParams () {
|
39 | var qs = window.location.hash.substr(1)
|
40 |
|
41 | if (window.location.search.length > 0) {
|
42 |
|
43 | window.location.hash = window.location.search.substr(1)
|
44 | window.location.search = ''
|
45 | }
|
46 |
|
47 | var params = {}
|
48 | var parts = qs.split('&')
|
49 | for (var x in parts) {
|
50 | var keyValue = parts[x].split('=')
|
51 | if (keyValue[0] !== '') {
|
52 | params[keyValue[0]] = keyValue[1]
|
53 | }
|
54 | }
|
55 | return params
|
56 | }
|
57 | const defaultVersion = window.location.hostname === 'remix.ethereum.org' ? '0.7.7' : '0.8.0'
|
58 | let versionToLoad = urlParams().appVersion ? urlParams().appVersion : defaultVersion
|
59 |
|
60 | let assets = {
|
61 | '0.8.0': ['https://use.fontawesome.com/releases/v5.8.1/css/all.css', 'assets/css/pygment_trac.css'],
|
62 | '0.7.7': ['assets/css/font-awesome.min.css', 'assets/css/pygment_trac.css']
|
63 | }
|
64 | let versions = {
|
65 | '0.7.7': 'assets/js/0.7.7/app.js',
|
66 | '0.8.0': 'build/app.js'
|
67 | }
|
68 | for (let k in assets[versionToLoad]) {
|
69 | let app = document.createElement('link')
|
70 | app.setAttribute('rel', 'stylesheet')
|
71 | app.setAttribute('href', assets[versionToLoad][k])
|
72 | if (assets[versionToLoad][k] === 'https://use.fontawesome.com/releases/v5.8.1/css/all.css') {
|
73 | app.setAttribute('integrity', 'sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf')
|
74 | app.setAttribute('crossorigin', 'anonymous')
|
75 | }
|
76 | document.head.appendChild(app)
|
77 | }
|
78 | window.onload = () => {
|
79 | let app = document.createElement('script')
|
80 | app.setAttribute('src', versions[versionToLoad])
|
81 | document.body.appendChild(app)
|
82 | }
|
83 | </script>
|
84 | </body>
|
85 | </html>
|