client-options: make them case-insensitive & fix typo in docs

This commit is contained in:
bordun 2021-06-23 22:35:52 +02:00
parent 7528f702aa
commit 638244d6c0
5 changed files with 7 additions and 7 deletions

View file

@ -155,7 +155,7 @@ class Editor {
this.idClipboard = data.idClipboard
})
this.usePercents = !!ENV.usePercents
this.usePercents = !!ENV.usepercents
this.enabled = false
this.grid = true

View file

@ -1,7 +1,7 @@
window.IP = window.IP || ''
window.ENV = window.ENV || {}
location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi, (s,k,v)=>{
ENV[k]=v
ENV[k]=v.toLowerCase()
})
window.LANG = ENV.lang === 'debug' ? 'debug' : (ENV.lang || navigator.language || '').substr(0, 2).toLowerCase()
@ -18,7 +18,7 @@ window.GRIDWIDTH = GRIDWIDTH_CSS
window.ELECTRON_NOGPU = false
window.CANVAS_FRAMERATE = parseFloat(ENV.framerate || 60)
window.CANVAS_SCALING = parseFloat(ENV.forceHdpi) || ( ENV.hdpi ? window.devicePixelRatio : 1 )
window.CANVAS_SCALING = parseFloat(ENV.forcehdpi) || ( ENV.hdpi ? window.devicePixelRatio : 1 )
window.INITIALZOOM = ENV.zoom ? parseFloat(ENV.zoom) : 1
window.PXSCALE = INITIALZOOM
document.documentElement.style.setProperty('font-size', PXSCALE + 'px')

View file

@ -27,7 +27,7 @@ class UiConsole extends UiSidePanel {
})
this.length = 0
this.maxLength = ENV.consoleLength || 300
this.maxLength = ENV.consolelength || 300
this.history = ['']
this.cursor = 0

View file

@ -12,7 +12,7 @@ class Canvas extends Widget {
this.canvas = DOM.get(this.container, 'canvas')[0]
this.ctx = this.canvas.getContext('2d',{
desynchronized: !ELECTRON_NOGPU && ENV.desyncCanvas ? true : false,
desynchronized: !ELECTRON_NOGPU && ENV.desynccanvas ? true : false,
alpha: true
})