Detect autohiding scrollbar and shift header menu. #647
This commit is contained in:
parent
d9aa7657a7
commit
54c165b667
@ -1022,3 +1022,5 @@ Config =
|
||||
replyPruning:
|
||||
'Prune Replies': true
|
||||
'Max Replies': 1000
|
||||
|
||||
'Autohiding Scrollbar': false
|
||||
|
||||
@ -184,6 +184,12 @@ Main =
|
||||
$.addClass doc, if g.VIEW is 'thread' then 'thread-view' else g.VIEW
|
||||
$.addClass doc, $.engine if $.engine
|
||||
$.onExists doc, '.ad-cnt', (ad) -> $.onExists ad, 'img', -> $.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']
|
||||
Conf['Autohiding Scrollbar'] = !Conf['Autohiding Scrollbar']
|
||||
$.set 'Autohiding Scrollbar', Conf['Autohiding Scrollbar']
|
||||
$.toggleClass doc, 'autohiding-scrollbar'
|
||||
$.addStyle Main.css, 'fourchanx-css'
|
||||
Main.bgColorStyle = $.el 'style', id: 'fourchanx-bgcolor-css'
|
||||
|
||||
|
||||
@ -305,6 +305,9 @@ audio.controls-added {
|
||||
#shortcuts {
|
||||
float: right;
|
||||
}
|
||||
:root.autohiding-scrollbar #shortcuts {
|
||||
margin-right: 12px;
|
||||
}
|
||||
.shortcut {
|
||||
margin-left: 3px;
|
||||
vertical-align: middle;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user