From f998a003c0cb0b6a3373e0c7e3b0a74488737ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Mon, 2 Jan 2017 13:24:23 +0100 Subject: [PATCH] Font size unit should default to pixels See #882 --- js/glowingbear.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/glowingbear.js b/js/glowingbear.js index 370b098..c7ddab8 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -445,6 +445,10 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', }); // Update font size when changed settings.addCallback('fontsize', function(fontsize) { + // If no unit is specified, it should be pixels + if (fontsize.match(/^[0-9]+$/)) { + fontsize += 'px'; + } utils.changeClassStyle('favorite-font', 'fontSize', fontsize); });