From: Andrew Dolgov Date: Thu, 1 Jun 2006 14:24:17 +0000 (+0100) Subject: fix resize_feed_list if header or footer are disabled (closes #65) X-Git-Tag: 1.2.0~17 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a6c3f28c4a7987d2731f1cee94b6ce4be2aef0c8;p=tt-rss.git fix resize_feed_list if header or footer are disabled (closes #65) --- diff --git a/tt-rss.js b/tt-rss.js index f6a50733..7167d058 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -365,9 +365,20 @@ function resize_feeds_frame() { var f = document.getElementById("feeds-frame"); var tf = document.getElementById("mainFooter"); var th = document.getElementById("mainHeader"); - - f.style.height = document.body.scrollHeight - tf.scrollHeight - - th.scrollHeight - 50 + "px"; + + var footer_height = 0; + var header_height = 0; + + if (tf) { + footer_height = tf.scrollHeight; + } + + if (th) { + header_height = th.scrollHeight; + } + + f.style.height = document.body.scrollHeight - footer_height - + header_height - 50 + "px"; } function init_second_stage() {