more indexing changes

This commit is contained in:
ccd0 2014-04-12 18:41:05 -07:00
parent 102e5de01e
commit 1182047357
5 changed files with 7 additions and 7 deletions

View File

@ -182,7 +182,7 @@ Build =
'' ''
if isOP and g.VIEW is 'index' and Conf['JSON Navigation'] if isOP and g.VIEW is 'index' and Conf['JSON Navigation']
pageNum = Math.floor Index.liveThreadIDs.indexOf(postID) / Index.threadsNumPerPage pageNum = Math.floor Index.liveThreadIDs.indexOf(postID) / Index.threadsNumPerPage + 1
pageIcon = " <span class=page-num title='This thread is on page #{pageNum} in the original index.'>[#{pageNum}]</span>" pageIcon = " <span class=page-num title='This thread is on page #{pageNum} in the original index.'>[#{pageNum}]</span>"
else else
pageIcon = '' pageIcon = ''

View File

@ -671,11 +671,11 @@ vp-replace
] ]
# Board Navigation # Board Navigation
'Front page': [ 'Front page': [
'0' '1'
'Jump to front page.' 'Jump to front page.'
] ]
'Open front page': [ 'Open front page': [
'Shift+0' 'Shift+1'
'Open front page in a new tab.' 'Open front page in a new tab.'
] ]
'Next page': [ 'Next page': [

View File

@ -198,7 +198,7 @@ Navigate =
if threadID if threadID
view = 'thread' view = 'thread'
else else
pageNum = +view pageNum = +view or 1 # string to number, '' to 1
view = 'index' # path is "/boardID/". See the problem? view = 'index' # path is "/boardID/". See the problem?
if view is g.VIEW and boardID is g.BOARD.ID if view is g.VIEW and boardID is g.BOARD.ID

View File

@ -87,7 +87,7 @@ Keybinds =
# Board Navigation # Board Navigation
when Conf['Front page'] when Conf['Front page']
if Conf['JSON Navigation'] and g.VIEW is 'index' if Conf['JSON Navigation'] and g.VIEW is 'index'
Index.userPageNav 0 Index.userPageNav 1
else else
window.location = "/#{g.BOARD}/" window.location = "/#{g.BOARD}/"
when Conf['Open front page'] when Conf['Open front page']

View File

@ -80,5 +80,5 @@ ThreadStats =
for page in @response for page in @response
for thread in page.threads when thread.no is ThreadStats.thread.ID for thread in page.threads when thread.no is ThreadStats.thread.ID
ThreadStats.pageCountEl.textContent = page.page ThreadStats.pageCountEl.textContent = page.page
(if page.page is @response.length - 1 then $.addClass else $.rmClass) ThreadStats.pageCountEl, 'warning' (if page.page is @response.length then $.addClass else $.rmClass) ThreadStats.pageCountEl, 'warning'
return return