diff --git a/CHANGELOG.md b/CHANGELOG.md index 209fef983..ca415abf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,6 +77,9 @@ ### v1.12.3 +**v1.12.3.10** *(2016-10-27)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.12.3.10/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.12.3.10/builds/4chan-X-noupdate.crx)] +- Update due to 4chan's ad changes. + **v1.12.3.9** *(2016-10-18)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.12.3.9/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.12.3.9/builds/4chan-X-noupdate.crx)] - Add basic support for is.4chan.org domain. diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index a251d788d..055a431ab 100644 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -113,7 +113,7 @@ Settings = Enable it on boards.4chan.org in your browser's privacy settings (may be listed as part of "local data" or "cookies"). """ ads: (cb) -> - $.onExists doc, '.ad-cnt', (ad) -> $.onExists ad, 'img', -> + $.onExists doc, '.ad-cnt, .adg-rects', (ad) -> $.onExists ad, 'img, iframe', -> url = Redirect.to 'thread', {boardID: 'qa', threadID: 362590} cb $.el 'li', <%= html( diff --git a/src/css/style.css b/src/css/style.css index cb87bae07..706d57da0 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -129,12 +129,13 @@ body > div[style*=" top: -10000px;"] { :root:not(.ads-loaded) .ad-cnt > * { height: auto; } +:root:not(.ads-loaded) .adg-rects, :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) { +div.center[style] { display: none !important; } diff --git a/src/main/Main.coffee b/src/main/Main.coffee index 417de947f..78c0d0f19 100644 --- a/src/main/Main.coffee +++ b/src/main/Main.coffee @@ -187,7 +187,7 @@ Main = $.addClass doc, 'fourchan-x', 'seaweedchan' $.addClass doc, if g.VIEW is 'thread' then 'thread-view' else g.VIEW $.addClass doc, "ua-#{$.engine}" if $.engine - $.onExists doc, '.ad-cnt', (ad) -> $.onExists ad, 'img', -> $.addClass doc, 'ads-loaded' + $.onExists doc, '.ad-cnt, .adg-rects', (ad) -> $.onExists ad, 'img, iframe', -> $.addClass doc, 'ads-loaded' $.addClass doc, 'autohiding-scrollbar' if Conf['Autohiding Scrollbar'] $.ready -> if d.body.clientHeight > doc.clientHeight and (window.innerWidth is doc.clientWidth) isnt Conf['Autohiding Scrollbar']