diff options
author | Andrew Dolgov <[email protected]> | 2006-06-01 15:24:17 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2006-06-01 15:24:17 +0100 |
commit | a6c3f28c4a7987d2731f1cee94b6ce4be2aef0c8 (patch) | |
tree | 54c729d69aa20de9dbd2180b9bfd2f4927d98cc5 /tt-rss.js | |
parent | c017149cdeeb55965e300ba06144697dd1f54278 (diff) |
fix resize_feed_list if header or footer are disabled (closes #65)
Diffstat (limited to 'tt-rss.js')
-rw-r--r-- | tt-rss.js | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -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() { |