diff --git a/nullboard.html b/nullboard.html index ebdf2f9..e4fd80c 100644 --- a/nullboard.html +++ b/nullboard.html @@ -1401,14 +1401,13 @@ function AppConfig() { - this.format = NB.confVersion; - this.max_undo = 50; // board revisions to keep - this.fname = null; // font name - this.fs = null; // font-size - this.lh = null; // line-height - this.theme = null; // default or 'dark' - this.fsize = null; // default or 'z1' -- deprecated - this.board = null; // active board + this.format = NB.confVersion; + this.maxUndo = 50; // board revisions to keep + this.fontName = null; // font-family + this.fontSize = null; // font-size + this.lineHeight = null; // line-height + this.theme = null; // default or 'dark' + this.board = null; // active board } function BoardMeta() @@ -1463,19 +1462,19 @@ setFontName(fname) { - this.conf.fname = fname; + this.conf.fontName = fname; return this.setJson('config', this.conf); } setFontSize(fs) { - this.conf.fs = fs; + this.conf.fontSize = fs; return this.setJson('config', this.conf); } setLineHeight(lh) { - this.conf.lh = lh; + this.conf.lineHeight = lh; return this.setJson('config', this.conf); } @@ -1529,7 +1528,7 @@ for (var rev of meta.history) { - if ( (rev_old < rev && rev < rev_new) || (rebuild.length >= this.conf.max_undo) ) + if ( (rev_old < rev && rev < rev_new) || (rebuild.length >= this.conf.maxUndo) ) { this.delItem('board.' + board.id + '.' + rev); console.log( `Deleted revision ${rev} of ${board.id} (${board.title})` ); @@ -1729,8 +1728,8 @@ if (this.getItem('fsize') == 'z1') { - this.conf.fs = 13; - this.conf.lh = 17; + this.conf.fontSize = 13; + this.conf.lineHeight = 17; } if (! this.setJson('config', this.conf)) @@ -3187,48 +3186,40 @@ */ function initFonts() { - var fonts_togo = 0; - var fv_defs; + var toGo = 0; + var loaded = []; + var failed = []; - function getFontVars(selector) - { - var cssRules = document.styleSheets[0].rules; - var ret = { fs: null, lh: null }; - - for (var i=0; i