transition to new HTML
This commit is contained in:
parent
0bdb01e08f
commit
7aeb46abb9
@ -1,3 +1,6 @@
|
||||
**ccd0**
|
||||
- Start transition to new HTML.
|
||||
|
||||
### v1.7.10
|
||||
*2014-04-17*
|
||||
|
||||
|
||||
@ -103,6 +103,7 @@ Index =
|
||||
d.implementation.createDocument(null, null, null).appendChild board
|
||||
|
||||
$.rm navLink for navLink in $$ '.navLinks'
|
||||
$.id('search-box')?.parentNode.remove()
|
||||
$.after $.x('child::form/preceding-sibling::hr[1]'), Index.navLinks
|
||||
$.rmClass doc, 'index-loading'
|
||||
|
||||
|
||||
@ -112,8 +112,8 @@ Navigate =
|
||||
|
||||
updateBoard: (boardID) ->
|
||||
fullBoardList = $ '#full-board-list', Header.boardList
|
||||
$.rmClass $('.current', fullBoardList), 'current'
|
||||
$.addClass $("a[href*='/#{boardID}/']", fullBoardList), 'current'
|
||||
$('.current', fullBoardList)?.classList.remove 'current'
|
||||
$("a[href*='/#{boardID}/']", fullBoardList)?.classList.add 'current'
|
||||
Header.generateBoardList Conf['boardnav'].replace /(\r\n|\n|\r)/g, ' '
|
||||
|
||||
QR.flagsInput()
|
||||
|
||||
@ -56,9 +56,12 @@ a[href="javascript:;"] {
|
||||
.warning {
|
||||
color: red;
|
||||
}
|
||||
#boardNavDesktop {
|
||||
#boardNavDesktop, #boardNavMobile {
|
||||
display: none !important;
|
||||
}
|
||||
body.hasDropDownNav{
|
||||
margin-top: 5px;
|
||||
}
|
||||
a {
|
||||
outline: none !important;
|
||||
}
|
||||
@ -66,9 +69,12 @@ a {
|
||||
border-radius: 3px;
|
||||
padding: 0px 2px;
|
||||
}
|
||||
body>hr, .ad-plea-bottom + hr {
|
||||
hr {
|
||||
display: none;
|
||||
}
|
||||
.board hr {
|
||||
display: block;
|
||||
}
|
||||
.board > hr:last-of-type {
|
||||
border-top-color: transparent !important;
|
||||
}
|
||||
|
||||
@ -130,10 +130,7 @@ class Post
|
||||
thumb.src
|
||||
else
|
||||
"#{location.protocol}//t.4cdn.org/#{@board}/thumb/#{@file.URL.match(/(\d+)\./)[1]}s.jpg"
|
||||
@file.name = if nameNode = $ 'span', fileText
|
||||
nameNode.title or nameNode.textContent
|
||||
else
|
||||
fileText.title
|
||||
@file.name = fileText.title or fileText.lastElementChild.title or fileText.lastElementChild.textContent
|
||||
<% if (type === 'crx') { %>
|
||||
# replace %22 with quotes, see:
|
||||
# crbug.com/81193
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Banner =
|
||||
init: ->
|
||||
$.asap (-> d.body), ->
|
||||
$.asap (-> $ '.abovePostForm'), Banner.ready
|
||||
$.asap (-> $ 'hr'), Banner.ready
|
||||
|
||||
ready: ->
|
||||
banner = $ ".boardBanner"
|
||||
@ -10,7 +10,6 @@ Banner =
|
||||
i = 0
|
||||
while child = children[i++]
|
||||
if i is 1
|
||||
child.id = "Banner"
|
||||
child.title = "Click to change"
|
||||
$.on child, 'click', Banner.cb.toggle
|
||||
|
||||
@ -35,7 +34,7 @@ Banner =
|
||||
->
|
||||
type = Object.keys(types)[Math.floor 3 * Math.random()]
|
||||
num = Math.floor types[type] * Math.random()
|
||||
@src = "//s.4cdn.org/image/title/#{num}.#{type}"
|
||||
$('img', @parentNode).src = "//s.4cdn.org/image/title/#{num}.#{type}"
|
||||
|
||||
click: (e) ->
|
||||
if e.ctrlKey
|
||||
|
||||
@ -109,10 +109,9 @@ Keybinds =
|
||||
if form = $ '.prev form'
|
||||
window.location = form.action
|
||||
when Conf['Search form']
|
||||
if Conf['JSON Navigation']
|
||||
Index.searchInput.focus()
|
||||
else
|
||||
$.id('search-btn').click()
|
||||
searchInput = if Conf['JSON Navigation'] then Index.searchInput else $.id('search-box')
|
||||
Header.scrollToIfNeeded searchInput
|
||||
searchInput.focus()
|
||||
when Conf['Open catalog']
|
||||
if Conf['External Catalog']
|
||||
window.location = CatalogLinks.external(g.BOARD.ID)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user