From 3f623782b7260706a367ddb7fc522389f84127a6 Mon Sep 17 00:00:00 2001 From: mappu Date: Sun, 10 Dec 2017 12:19:48 +1300 Subject: [PATCH] use a constant for default font size --- static/archive.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/archive.js b/static/archive.js index f11fcce..a2d0864 100755 --- a/static/archive.js +++ b/static/archive.js @@ -5,6 +5,7 @@ var alreadyLoaded = false; var $chatArea = document.getElementById("chatarea"); var $selHub = document.getElementById("selHub"); var $frmHub = document.getElementById("frmHub"); +var DEFAULT_FONT_SIZE = 12; function urldesc(s) { return decodeURIComponent(s.replace(/\+/g, " ")); @@ -49,7 +50,7 @@ function highlight(str) { function fontSize(change) { var curSize = cookie_get("fontsize"); if (curSize === null) { - curSize = 12; + curSize = DEFAULT_FONT_SIZE; } else { curSize = + curSize; } @@ -81,7 +82,7 @@ function onLoad() { } alreadyLoaded = true; - // + // $chatArea.innerHTML = highlight( $chatArea.innerHTML );