From e5c77cf95e9e2e8ef2d87fcbfdc8b3a149078240 Mon Sep 17 00:00:00 2001 From: James Campos Date: Sun, 19 Dec 2010 22:59:00 -0800 Subject: [PATCH] body { padding-bottom } when Thread Navigation --- 4chan_x.coffee | 12 +++++++++-- 4chan_x.js | 58 +------------------------------------------------- 2 files changed, 11 insertions(+), 59 deletions(-) diff --git a/4chan_x.coffee b/4chan_x.coffee index b088b3a57..8e43c8bb4 100644 --- a/4chan_x.coffee +++ b/4chan_x.coffee @@ -911,7 +911,7 @@ if lastChecked < now - 1*DAY GM_setValue("hiddenReplies/#{g.BOARD}/", JSON.stringify(g.hiddenReplies)) GM_setValue('lastChecked', now) -GM_addStyle ' +GM_addStyle " #watcher { position: absolute; } @@ -967,7 +967,15 @@ GM_addStyle ' .pointer { cursor: pointer; } -' + #{ + if getConfig 'Thread Navigation' + "body { + padding-bottom: #{document.body.clientHeight}px; + }" + else + '' + } +" if navtopr = $ '#navtopr a' text = navtopr.nextSibling #css doesn't see text nodes diff --git a/4chan_x.js b/4chan_x.js index 29a6df295..cf737668b 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1182,63 +1182,7 @@ GM_setValue("hiddenReplies/" + g.BOARD + "/", JSON.stringify(g.hiddenReplies)); GM_setValue('lastChecked', now); } - GM_addStyle('\ - #watcher {\ - position: absolute;\ - }\ - #watcher > div.move {\ - text-decoration: underline;\ - padding: 5px 5px 0 5px;\ - }\ - #watcher > div:last-child {\ - padding: 0 5px 5px 5px;\ - }\ - span.error {\ - color: red;\ - }\ - #qr.auto:not(:hover) form {\ - visibility: collapse;\ - }\ - #qr span.error {\ - position: absolute;\ - bottom: 0;\ - left: 0;\ - }\ - #qr {\ - position: fixed;\ - }\ - #qr > div {\ - text-align: right;\ - }\ - #qr > form > div, /* ad */\ - #qr td.rules {\ - display: none;\ - }\ - #options {\ - position: fixed;\ - padding: 5px;\ - text-align: right;\ - }\ - form[name=delform] a img {\ - border: 0px;\ - float: left;\ - margin: 0px 20px;\ - }\ - span.navlinks {\ - position: absolute;\ - right: 5px;\ - }\ - span.navlinks > a {\ - font-size: 16px;\ - text-decoration: none;\ - }\ - .hide {\ - display: none;\ - }\ - .pointer {\ - cursor: pointer;\ - }\ -'); + GM_addStyle(" #watcher { position: absolute; } #watcher > div.move { text-decoration: underline; padding: 5px 5px 0 5px; } #watcher > div:last-child { padding: 0 5px 5px 5px; } span.error { color: red; } #qr.auto:not(:hover) form { visibility: collapse; } #qr span.error { position: absolute; bottom: 0; left: 0; } #qr { position: fixed; } #qr > div { text-align: right; } #qr > form > div, /* ad */ #qr td.rules { display: none; } #options { position: fixed; padding: 5px; text-align: right; } form[name=delform] a img { border: 0px; float: left; margin: 0px 20px; } span.navlinks { position: absolute; right: 5px; } span.navlinks > a { font-size: 16px; text-decoration: none; } .hide { display: none; } .pointer { cursor: pointer; } " + (getConfig('Thread Navigation') ? "body { padding-bottom: " + document.body.clientHeight + "px; }" : '') + ""); if (navtopr = $('#navtopr a')) { text = navtopr.nextSibling; a = n('a', {