diff --git a/mods/glow.js b/mods/glow.js index 338b8f29..a1cd16af 100644 --- a/mods/glow.js +++ b/mods/glow.js @@ -1,3 +1,21 @@ +/* TODO: + +- warning and automatic disable for non-chromium users +- firefly glow +- sun temperature-dependent glow strength + +*/ + +var isChromium = !!window.chrome; + +if (!isChromium) { + window.addEventListener("load",function(){ + console.log(1) + logMessage("Error: glow.js only works on Chrome or Chromium-based browsers.") + }) +} +else { + addCanvasLayer("glowmod"); addCanvasLayer("glowmod2"); canvasLayersPre.unshift(canvasLayers["glowmod"]); @@ -78,4 +96,6 @@ renderEachPixel(function(pixel,ctx) { drawSquare(glowmodCtx2,"#ffff00",pixel.x-1,pixel.y-1,3); } } -}) \ No newline at end of file +}) + +} \ No newline at end of file