use a constant for default font size

This commit is contained in:
mappu 2017-12-10 12:19:48 +13:00
parent 92e7064372
commit 3f623782b7

View File

@ -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 );