Better background color setting.
This commit is contained in:
parent
d880875c39
commit
761b05876b
@ -252,11 +252,15 @@ Main =
|
|||||||
div.style.position = 'absolute';
|
div.style.position = 'absolute';
|
||||||
div.style.visibility = 'hidden';
|
div.style.visibility = 'hidden';
|
||||||
$.add d.body, div
|
$.add d.body, div
|
||||||
bgColor = window.getComputedStyle(div).backgroundColor
|
sDiv = window.getComputedStyle(div)
|
||||||
|
bgColor = sDiv.backgroundColor
|
||||||
$.rm div
|
$.rm div
|
||||||
|
unless /^rgb\(/.test(bgColor) and sDiv.backgroundImage is 'none'
|
||||||
|
s = window.getComputedStyle(d.body)
|
||||||
|
bgColor = "#{s.backgroundColor} #{s.backgroundImage} #{s.backgroundRepeat} #{s.backgroundPosition}"
|
||||||
Main.bgColorStyle.textContent = """
|
Main.bgColorStyle.textContent = """
|
||||||
.dialog, .suboption-list > div:last-of-type, :root.catalog-hover-expand .catalog-container:hover > .post {
|
.dialog, .suboption-list > div:last-of-type, :root.catalog-hover-expand .catalog-container:hover > .post {
|
||||||
background-color: #{bgColor};
|
background: #{bgColor};
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
$.after $.id('fourchanx-css'), Main.bgColorStyle
|
$.after $.id('fourchanx-css'), Main.bgColorStyle
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user