Prettified all files.

This commit is contained in:
2019-07-18 12:26:39 +02:00
parent 7744b92771
commit 2d400a18ec
125 changed files with 11184 additions and 8154 deletions
+3 -6
View File
@@ -7,7 +7,6 @@
* @class Theme
*/
export default class Theme {
/**
* Loads a config file and parses it to JSON.
*
@@ -18,17 +17,15 @@ export default class Theme {
*/
static loadConfig(path = null) {
return new Promise((resolve, reject) => {
path = (path) ? path : './config.json'
path = path ? path : './config.json'
let xhttp = new XMLHttpRequest()
xhttp.onreadystatechange = function () {
xhttp.onreadystatechange = function() {
if (this.readyState == 4) {
if (this.status == 200 || Theme._isLocal()) {
try {
const json = JSON.parse(this.responseText)
resolve(json)
} catch (e) {
reject(e)
}
@@ -41,6 +38,6 @@ export default class Theme {
}
static _isLocal() {
return (window.location.protocol == 'file:')
return window.location.protocol == 'file:'
}
}