Don't set the theme class if no stylesheet is selected.

Give Oneechan less stuff to override.
This commit is contained in:
ccd0 2016-01-25 21:37:12 -08:00
parent 4530c5a869
commit 1dad377fae
2 changed files with 4 additions and 1 deletions

View File

@ -185,11 +185,13 @@ Main =
styleSheets = $$ 'link[rel="alternate stylesheet"]', d.head
setStyle = ->
$.rmClass doc, style
style = null
for styleSheet in styleSheets
if styleSheet.href is mainStyleSheet?.href
style = styleSheet.title.toLowerCase().replace('new', '').trim().replace /\s+/g, '-'
break
$.addClass doc, style
if style
$.addClass doc, style
setStyle()
return unless mainStyleSheet
new MutationObserver(setStyle).observe mainStyleSheet,

View File

@ -2,6 +2,7 @@
.dialog {
border: 1px solid;
display: block;
background-color: inherit;
}
.dialog:not(#qr):not(#thread-watcher):not(#header-bar) {
box-shadow: 0 1px 2px rgba(0, 0, 0, .15);