mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-27 06:43:47 +01:00
19 lines
404 B
JavaScript
19 lines
404 B
JavaScript
|
class DebugMode {
|
||
|
static get Enabled() {
|
||
|
var debug = window.sessionStorage.getItem("debug")
|
||
|
if (debug == null) {
|
||
|
return false
|
||
|
}
|
||
|
else {
|
||
|
return Boolean(JSON.parse(debug))
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static set Enabled(value) {
|
||
|
const newval = Boolean(value)
|
||
|
if (this.Enabled !== newval) {
|
||
|
window.sessionStorage.setItem("debug", newval)
|
||
|
window.location.reload()
|
||
|
}
|
||
|
}
|
||
|
}
|