Don't set the theme class if no stylesheet is selected.
Give Oneechan less stuff to override.
This commit is contained in:
parent
4530c5a869
commit
1dad377fae
@ -185,11 +185,13 @@ Main =
|
|||||||
styleSheets = $$ 'link[rel="alternate stylesheet"]', d.head
|
styleSheets = $$ 'link[rel="alternate stylesheet"]', d.head
|
||||||
setStyle = ->
|
setStyle = ->
|
||||||
$.rmClass doc, style
|
$.rmClass doc, style
|
||||||
|
style = null
|
||||||
for styleSheet in styleSheets
|
for styleSheet in styleSheets
|
||||||
if styleSheet.href is mainStyleSheet?.href
|
if styleSheet.href is mainStyleSheet?.href
|
||||||
style = styleSheet.title.toLowerCase().replace('new', '').trim().replace /\s+/g, '-'
|
style = styleSheet.title.toLowerCase().replace('new', '').trim().replace /\s+/g, '-'
|
||||||
break
|
break
|
||||||
$.addClass doc, style
|
if style
|
||||||
|
$.addClass doc, style
|
||||||
setStyle()
|
setStyle()
|
||||||
return unless mainStyleSheet
|
return unless mainStyleSheet
|
||||||
new MutationObserver(setStyle).observe mainStyleSheet,
|
new MutationObserver(setStyle).observe mainStyleSheet,
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
.dialog {
|
.dialog {
|
||||||
border: 1px solid;
|
border: 1px solid;
|
||||||
display: block;
|
display: block;
|
||||||
|
background-color: inherit;
|
||||||
}
|
}
|
||||||
.dialog:not(#qr):not(#thread-watcher):not(#header-bar) {
|
.dialog:not(#qr):not(#thread-watcher):not(#header-bar) {
|
||||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
|
box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user