Switch document class names when switching between views
This commit is contained in:
parent
259529b6dd
commit
ab8607710b
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -204,7 +204,7 @@ Index =
|
||||
update: (pageNum) ->
|
||||
return unless navigator.onLine
|
||||
unless d.readyState is 'loading' or Index.root.parentElement
|
||||
$.replace $ '.board', Index.root
|
||||
$.replace $('.board'), Index.root
|
||||
Index.req?.abort()
|
||||
Index.notice?.close()
|
||||
|
||||
|
||||
@ -356,6 +356,11 @@ Main =
|
||||
|
||||
return
|
||||
|
||||
updateContext: (view) ->
|
||||
$.rmClass doc, g.VIEW
|
||||
$.addClass doc, view
|
||||
g.VIEW = view
|
||||
|
||||
navigate: (e) ->
|
||||
return if @hostname isnt 'boards.4chan.org' or window.location.hostname is 'rs.4chan.org'
|
||||
|
||||
@ -376,7 +381,7 @@ Main =
|
||||
if view isnt g.VIEW
|
||||
Main.disconnect()
|
||||
Main.clean()
|
||||
g.VIEW = view
|
||||
Main.updateContext view
|
||||
|
||||
if view is 'index'
|
||||
Main.updateBoard boardID unless boardID is g.BOARD.ID
|
||||
|
||||
@ -486,7 +486,17 @@ div.center:not(.ad-cnt) {
|
||||
.summary {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.thread #index-last-refresh,
|
||||
.thread #index-search-clear,
|
||||
.thread #index-search {
|
||||
display: none;
|
||||
}
|
||||
#index-last-refresh::before {
|
||||
content: '[';
|
||||
}
|
||||
#index-last-refresh::after {
|
||||
content: ']';
|
||||
}
|
||||
|
||||
/* Announcement Hiding */
|
||||
:root.hide-announcement #globalMessage {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
[<a href="./catalog">Catalog</a>]
|
||||
[<time id="index-last-refresh" title="Last index refresh">...</time>]
|
||||
<time id="index-last-refresh" title="Last index refresh">...</time>
|
||||
<input type="search" id="index-search" class="field" placeholder="Search">
|
||||
<a id="index-search-clear" href="javascript:;" title="Clear search">×</a>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user