Make bottom board list code work on Tinyboard/vichan sites.
This commit is contained in:
parent
f6c37ce57f
commit
4d9dae9095
@ -95,7 +95,7 @@ Header =
|
||||
$.onExists doc, "#{Site.selectors.boardList} + *", Header.generateFullBoardList
|
||||
|
||||
Main.ready ->
|
||||
if not (footer = $.id 'boardNavDesktopFoot')
|
||||
if Site.software is 'yotsuba' and not (footer = $.id 'boardNavDesktopFoot')
|
||||
return unless (absbot = $.id 'absbot')
|
||||
footer = $.id('boardNavDesktop').cloneNode true
|
||||
footer.id = 'boardNavDesktopFoot'
|
||||
@ -103,10 +103,10 @@ Header =
|
||||
$('#settingsWindowLink', footer).id = 'settingsWindowLinkBot'
|
||||
$.before absbot, footer
|
||||
$.globalEval 'window.cloneTopNav = function() {};'
|
||||
if (a = $ "a[href*='/#{g.BOARD}/']", footer)
|
||||
a.className = 'current'
|
||||
Header.bottomBoardList = $ '.boardList', footer
|
||||
CatalogLinks.setLinks Header.bottomBoardList
|
||||
if (Header.bottomBoardList = $ Site.selectors.boardListBottom)
|
||||
for a in $$ 'a', Header.bottomBoardList
|
||||
a.className = 'current' if a.hostname is location.hostname and a.pathname.split('/')[1] is g.BOARD.ID
|
||||
CatalogLinks.setLinks Header.bottomBoardList
|
||||
|
||||
if Site.software is 'yotsuba' and (g.VIEW is 'catalog' or !Conf['Disable Native Extension'])
|
||||
cs = $.el 'a', href: 'javascript:;'
|
||||
|
||||
@ -57,7 +57,7 @@ a[href="javascript:;"] {
|
||||
#boardNavDesktop, #boardNavMobile {
|
||||
display: none !important;
|
||||
}
|
||||
:root.hide-bottom-board-list #boardNavDesktopFoot {
|
||||
:root.hide-bottom-board-list $site$boardListBottom {
|
||||
display: none;
|
||||
}
|
||||
body.hasDropDownNav{
|
||||
@ -366,7 +366,7 @@ audio.controls-added {
|
||||
#toggleMsgBtn {
|
||||
display: none !important;
|
||||
}
|
||||
.current {
|
||||
#board-list .current {
|
||||
font-weight: bold;
|
||||
}
|
||||
@media (min-width: 1300px) {
|
||||
|
||||
@ -100,6 +100,7 @@ SW.tinyboard =
|
||||
spoiler: '.spoiler'
|
||||
quotelink: 'a[onclick^="highlightReply("]'
|
||||
boardList: '.boardlist'
|
||||
boardListBottom: '.boardlist.bottom'
|
||||
styleSheet: '#stylesheet'
|
||||
|
||||
xpath:
|
||||
|
||||
@ -48,6 +48,7 @@ SW.yotsuba =
|
||||
spoiler: 's'
|
||||
quotelink: ':not(pre) > .quotelink' # XXX https://github.com/4chan/4chan-JS/issues/77: 4chan currently creates quote links inside [code] tags; ignore them
|
||||
boardList: '#boardNavDesktop > .boardList'
|
||||
boardListBottom: '#boardNavDesktopFoot > .boardList'
|
||||
styleSheet: 'link[title=switch]'
|
||||
|
||||
xpath:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user