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) ->
|
update: (pageNum) ->
|
||||||
return unless navigator.onLine
|
return unless navigator.onLine
|
||||||
unless d.readyState is 'loading' or Index.root.parentElement
|
unless d.readyState is 'loading' or Index.root.parentElement
|
||||||
$.replace $ '.board', Index.root
|
$.replace $('.board'), Index.root
|
||||||
Index.req?.abort()
|
Index.req?.abort()
|
||||||
Index.notice?.close()
|
Index.notice?.close()
|
||||||
|
|
||||||
|
|||||||
@ -356,6 +356,11 @@ Main =
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
updateContext: (view) ->
|
||||||
|
$.rmClass doc, g.VIEW
|
||||||
|
$.addClass doc, view
|
||||||
|
g.VIEW = view
|
||||||
|
|
||||||
navigate: (e) ->
|
navigate: (e) ->
|
||||||
return if @hostname isnt 'boards.4chan.org' or window.location.hostname is 'rs.4chan.org'
|
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
|
if view isnt g.VIEW
|
||||||
Main.disconnect()
|
Main.disconnect()
|
||||||
Main.clean()
|
Main.clean()
|
||||||
g.VIEW = view
|
Main.updateContext view
|
||||||
|
|
||||||
if view is 'index'
|
if view is 'index'
|
||||||
Main.updateBoard boardID unless boardID is g.BOARD.ID
|
Main.updateBoard boardID unless boardID is g.BOARD.ID
|
||||||
|
|||||||
@ -486,7 +486,17 @@ div.center:not(.ad-cnt) {
|
|||||||
.summary {
|
.summary {
|
||||||
text-decoration: none;
|
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 */
|
/* Announcement Hiding */
|
||||||
:root.hide-announcement #globalMessage {
|
:root.hide-announcement #globalMessage {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
[<a href="./catalog">Catalog</a>]
|
[<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">
|
<input type="search" id="index-search" class="field" placeholder="Search">
|
||||||
<a id="index-search-clear" href="javascript:;" title="Clear search">×</a>
|
<a id="index-search-clear" href="javascript:;" title="Clear search">×</a>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user