From 05b13d4fdd8c5fa45d2452117e2729369d17283d Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 5 Dec 2015 15:41:05 -0800 Subject: [PATCH] Cosmetic fixes for blocked ads. --- src/General/Main.coffee | 1 + src/css/style.css | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 8d56586e8..9bccb09da 100644 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -158,6 +158,7 @@ Main = $.addClass doc, 'fourchan-x', 'seaweedchan' $.addClass doc, if g.VIEW is 'thread' then 'thread-view' else g.VIEW $.addClass doc, $.engine if $.engine + $.onExists doc, '.ad-cnt', true, (ad) -> $.onExists ad, 'img', true, -> $.addClass doc, 'ads-loaded' $.addStyle Main.css, 'fourchanx-css' keyboard = false diff --git a/src/css/style.css b/src/css/style.css index 3e5ec0071..a16ec7ce1 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -71,9 +71,6 @@ body.hasDropDownNav{ border-radius: 3px; padding: 0px 2px; } -.ad-plea { - display: none; -} /* 4chan style fixes */ .opContainer, .op { @@ -91,9 +88,6 @@ body.hasDropDownNav{ [hidden] { display: none !important; } -hr + div.center:not(.ad-cnt):not(.topad):not(.middlead):not(.bottomad) { - display: none !important; -} .page-num { margin-right: -8px; } @@ -123,6 +117,17 @@ body > div[style*=" top: -10000px;"] { visibility: hidden !important; } +/* Ads */ +:root:not(.ads-loaded) .ad-cnt, +:root:not(.ads-loaded) .ad-plea, +:root:not(.ads-loaded) hr.abovePostForm, +:root:not(.ads-loaded) .ad-plea-bottom + hr { + display: none; +} +hr + div.center:not(.ad-cnt):not(.topad):not(.middlead):not(.bottomad) { + display: none !important; +} + /* Anti-autoplay */ audio.controls-added { display: block;