-
-
Current version: ${this._view.version}
-
- ${this._view.versionSelector}
-
-
-
`
+ ${this._view.versionSelector}
+
+ ${this._view.compilationButton}
+
+
+
+ Compiler Configuration
+
+ -
+ ${this._view.autoCompile}
+
+
+ -
+ ${this._view.optimize}
+
+
+ -
+ ${this._view.hideWarningsBox}
+
+
+
+
+ `
return this._view.compileContainer
}
@@ -160,14 +192,18 @@ class CompilerContainer {
_updateVersionSelector () {
this._view.versionSelector.innerHTML = ''
- this._view.versionSelector.appendChild(yo`
`)
- this.data.allversions.forEach(build => this._view.versionSelector.appendChild(yo`
`))
+ this.data.allversions.forEach(build => {
+ const option = build.path === this.data.selectedVersion
+ ? yo`
`
+ : yo`
`
+ this._view.versionSelector.appendChild(option)
+ })
this._view.versionSelector.removeAttribute('disabled')
this.queryParams.update({ version: this.data.selectedVersion })
- var url
+ let url
if (this.data.selectedVersion === 'builtin') {
- var location = window.document.location
- location = location.protocol + '//' + location.host + '/' + location.pathname
+ let location = window.document.location
+ location = `${location.protocol}//${location.host}/${location.pathname}`
if (location.endsWith('index.html')) location = location.substring(0, location.length - 10)
if (!location.endsWith('/')) location += '/'
url = location + 'soljson.js'
@@ -177,7 +213,7 @@ class CompilerContainer {
}
url = `${this.data.baseurl}/${this.data.selectedVersion}`
}
- var isFirefox = typeof InstallTrigger !== 'undefined'
+ const isFirefox = typeof InstallTrigger !== 'undefined'
if (document.location.protocol !== 'file:' && Worker !== undefined && isFirefox) {
// Workers cannot load js on "file:"-URLs and we get a
// "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium,