Voeg 28 herkenbare kleurplaten en creatieve niveaus toe (v0.4.66-beta) #4
2 changed files with 8 additions and 4 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
||||||
0.2.10
|
0.2.18
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
/* version — shown until /api/version resolves (or if the fetch fails, e.g. offline).
|
/* version — shown until /api/version resolves (or if the fetch fails, e.g. offline).
|
||||||
Kept in sync by hand with the VERSION file at the repo root on every release. */
|
Kept in sync by hand with the VERSION file at the repo root on every release. */
|
||||||
const VERSION = "0.2.10";
|
const VERSION = "0.2.18";
|
||||||
(function(){
|
(function(){
|
||||||
const tag = document.getElementById("verTag");
|
const tag = document.getElementById("verTag");
|
||||||
tag.textContent = "v"+VERSION;
|
tag.textContent = "v"+VERSION;
|
||||||
|
|
@ -13,9 +13,13 @@ const VERSION = "0.2.10";
|
||||||
.then(r=>r.ok ? r.json() : null)
|
.then(r=>r.ok ? r.json() : null)
|
||||||
.then(v=>{
|
.then(v=>{
|
||||||
if(!v || typeof v.version!=="string") return;
|
if(!v || typeof v.version!=="string") return;
|
||||||
const text = v.version.startsWith("v") ? v.version : "v"+v.version;
|
let text = v.version.startsWith("v") ? v.version : "v"+v.version;
|
||||||
|
const isBeta = text.includes("beta");
|
||||||
|
/* on dev the sha is shown inline (not just as a hover-title) so a deploy is always
|
||||||
|
visibly different, even if the VERSION file itself was forgotten in a commit */
|
||||||
|
if(isBeta && v.sha) text += " ("+v.sha+")";
|
||||||
tag.textContent = text;
|
tag.textContent = text;
|
||||||
tag.classList.toggle("beta", text.includes("beta"));
|
tag.classList.toggle("beta", isBeta);
|
||||||
if(v.sha) tag.title = v.sha;
|
if(v.sha) tag.title = v.sha;
|
||||||
})
|
})
|
||||||
.catch(()=>{});
|
.catch(()=>{});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue