Fix background color of dialogs on Tinyboard.

This commit is contained in:
name 2017-12-10 15:29:55 -08:00
parent 1fd7faa8c7
commit f8028b83f3
3 changed files with 9 additions and 3 deletions

View File

@ -244,9 +244,9 @@ Main =
$.rm Main.bgColorStyle
else
# Determine proper background color for dialogs if 4chan is using a special stylesheet.
div = $.el 'div',
className: 'reply'
div.style.cssText = 'position: absolute; visibility: hidden;'
div = Site.bgColoredEl()
div.style.position = 'absolute';
div.style.visibility = 'hidden';
$.add d.body, div
bgColor = window.getComputedStyle(div).backgroundColor
$.rm div

View File

@ -45,6 +45,9 @@ SW.tinyboard =
$
///
bgColoredEl: ->
$.el 'div', className: 'post reply'
parseNodes: (post, nodes) ->
# Add vichan's span.poster_id around the ID if not already present.
return if nodes.uniqueID

View File

@ -52,6 +52,9 @@ SW.yotsuba =
$
///
bgColoredEl: ->
$.el 'div', className: 'reply'
isThisPageLegit: ->
# not 404 error page or similar.
location.hostname is 'boards.4chan.org' and