diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 8752adf87..46dc5cbd1 100755 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -151,12 +151,6 @@ Build = else "/#{boardID}/thread/#{threadID}\#q#{postID}" - pageIcon = if isOP and g.VIEW is 'index' and Conf['JSON Navigation'] - pageNum = Math.floor(Index.liveThreadIDs.indexOf(postID) / Index.threadsNumPerPage) + 1 - <%= html(' [${pageNum}]') %> - else - <%= html('') %> - sticky = if isSticky <%= html(' Sticky') %> else @@ -181,7 +175,7 @@ Build = '' + 'No.' + '${postID}' + - '&{pageIcon}&{sticky}&{closed}&{replyLink}' + + '&{sticky}&{closed}&{replyLink}' + '' + '' ) %> diff --git a/src/General/Index.coffee b/src/General/Index.coffee index e305c100b..07792da09 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -317,7 +317,6 @@ Index = try threadRoot = Build.thread g.BOARD, threadData if thread = g.BOARD.threads[threadData.no] - thread.setPage Math.floor i / Index.threadsNumPerPage thread.setStatus 'Sticky', !!threadData.sticky thread.setStatus 'Closed', !!threadData.closed else @@ -326,6 +325,7 @@ Index = Index.nodes.push threadRoot continue if thread.ID of thread.posts posts.push new Post $('.opContainer', threadRoot), thread, g.BOARD + thread.setPage i // Index.threadsNumPerPage + 1 catch err # Skip posts that we failed to parse. errors = [] unless errors diff --git a/src/General/lib/thread.class b/src/General/lib/thread.class index 49538bd12..40b817aa2 100755 --- a/src/General/lib/thread.class +++ b/src/General/lib/thread.class @@ -13,10 +13,12 @@ class Thread g.threads.push @fullID, board.threads.push @, @ setPage: (pageNum) -> - icon = $ '.page-num', @OP.nodes.post - for key in ['title', 'textContent'] - icon[key] = icon[key].replace /\d+/, pageNum - return + {info} = @OP.nodes + unless icon = $ '.page-num', info + icon = $.el 'span', className: 'page-num' + $.after $('a[title="Reply to this post"]', info), [$.tn(' '), icon] + icon.title = "This thread is on page #{pageNum} in the original index." + icon.textContent = "[#{pageNum}]" setStatus: (type, status) -> name = "is#{type}" return if @[name] is status