Always give integers for thread IDs.

This commit is contained in:
Mayhem 2013-06-25 20:50:11 +02:00
parent 51358e328a
commit 6213853f67
3 changed files with 3 additions and 4 deletions

View File

@ -185,7 +185,7 @@ Get =
# quotes
.replace /((&gt;){2}(&gt;\/[a-z\d]+\/)?\d+)/g, '<span class=deadlink>$1</span>'
threadID = data.thread_num
threadID = +data.thread_num
o =
# id
postID: "#{postID}"

View File

@ -182,7 +182,7 @@ Main =
posts = []
for threadRoot in $$ '.board > .thread', board
thread = new Thread threadRoot.id[1..], g.BOARD
thread = new Thread +threadRoot.id[1..], g.BOARD
threads.push thread
for postRoot in $$ '.thread > .postContainer', threadRoot
try

View File

@ -2,8 +2,7 @@ class Thread
callbacks: []
toString: -> @ID
constructor: (ID, @board) ->
@ID = +ID
constructor: (@ID, @board) ->
@fullID = "#{@board}.#{@ID}"
@posts = {}