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
|
$.onExists doc, "#{Site.selectors.boardList} + *", Header.generateFullBoardList
|
||||||
|
|
||||||
Main.ready ->
|
Main.ready ->
|
||||||
if not (footer = $.id 'boardNavDesktopFoot')
|
if Site.software is 'yotsuba' and not (footer = $.id 'boardNavDesktopFoot')
|
||||||
return unless (absbot = $.id 'absbot')
|
return unless (absbot = $.id 'absbot')
|
||||||
footer = $.id('boardNavDesktop').cloneNode true
|
footer = $.id('boardNavDesktop').cloneNode true
|
||||||
footer.id = 'boardNavDesktopFoot'
|
footer.id = 'boardNavDesktopFoot'
|
||||||
@ -103,9 +103,9 @@ Header =
|
|||||||
$('#settingsWindowLink', footer).id = 'settingsWindowLinkBot'
|
$('#settingsWindowLink', footer).id = 'settingsWindowLinkBot'
|
||||||
$.before absbot, footer
|
$.before absbot, footer
|
||||||
$.globalEval 'window.cloneTopNav = function() {};'
|
$.globalEval 'window.cloneTopNav = function() {};'
|
||||||
if (a = $ "a[href*='/#{g.BOARD}/']", footer)
|
if (Header.bottomBoardList = $ Site.selectors.boardListBottom)
|
||||||
a.className = 'current'
|
for a in $$ 'a', Header.bottomBoardList
|
||||||
Header.bottomBoardList = $ '.boardList', footer
|
a.className = 'current' if a.hostname is location.hostname and a.pathname.split('/')[1] is g.BOARD.ID
|
||||||
CatalogLinks.setLinks Header.bottomBoardList
|
CatalogLinks.setLinks Header.bottomBoardList
|
||||||
|
|
||||||
if Site.software is 'yotsuba' and (g.VIEW is 'catalog' or !Conf['Disable Native Extension'])
|
if Site.software is 'yotsuba' and (g.VIEW is 'catalog' or !Conf['Disable Native Extension'])
|
||||||
|
|||||||
@ -57,7 +57,7 @@ a[href="javascript:;"] {
|
|||||||
#boardNavDesktop, #boardNavMobile {
|
#boardNavDesktop, #boardNavMobile {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
:root.hide-bottom-board-list #boardNavDesktopFoot {
|
:root.hide-bottom-board-list $site$boardListBottom {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
body.hasDropDownNav{
|
body.hasDropDownNav{
|
||||||
@ -366,7 +366,7 @@ audio.controls-added {
|
|||||||
#toggleMsgBtn {
|
#toggleMsgBtn {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
.current {
|
#board-list .current {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@media (min-width: 1300px) {
|
@media (min-width: 1300px) {
|
||||||
|
|||||||
@ -100,6 +100,7 @@ SW.tinyboard =
|
|||||||
spoiler: '.spoiler'
|
spoiler: '.spoiler'
|
||||||
quotelink: 'a[onclick^="highlightReply("]'
|
quotelink: 'a[onclick^="highlightReply("]'
|
||||||
boardList: '.boardlist'
|
boardList: '.boardlist'
|
||||||
|
boardListBottom: '.boardlist.bottom'
|
||||||
styleSheet: '#stylesheet'
|
styleSheet: '#stylesheet'
|
||||||
|
|
||||||
xpath:
|
xpath:
|
||||||
|
|||||||
@ -48,6 +48,7 @@ SW.yotsuba =
|
|||||||
spoiler: 's'
|
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
|
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'
|
boardList: '#boardNavDesktop > .boardList'
|
||||||
|
boardListBottom: '#boardNavDesktopFoot > .boardList'
|
||||||
styleSheet: 'link[title=switch]'
|
styleSheet: 'link[title=switch]'
|
||||||
|
|
||||||
xpath:
|
xpath:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user