Update deps.
This commit is contained in:
parent
f99481a168
commit
c1e76c8805
@ -26,13 +26,13 @@
|
|||||||
"grunt-bump": "~0.0.13",
|
"grunt-bump": "~0.0.13",
|
||||||
"grunt-concurrent": "~0.4.3",
|
"grunt-concurrent": "~0.4.3",
|
||||||
"grunt-contrib-clean": "~0.5.0",
|
"grunt-contrib-clean": "~0.5.0",
|
||||||
"grunt-contrib-coffee": "~0.8.2",
|
"grunt-contrib-coffee": "~0.9.0",
|
||||||
"grunt-contrib-compress": "~0.6.0",
|
"grunt-contrib-compress": "~0.6.0",
|
||||||
"grunt-contrib-concat": "~0.3.0",
|
"grunt-contrib-concat": "~0.3.0",
|
||||||
"grunt-contrib-copy": "~0.5.0",
|
"grunt-contrib-copy": "~0.5.0",
|
||||||
"grunt-contrib-watch": "~0.5.3",
|
"grunt-contrib-watch": "~0.5.3",
|
||||||
"grunt-shell": "~0.6.4",
|
"grunt-shell": "~0.6.4",
|
||||||
"load-grunt-tasks": "~0.2.1"
|
"load-grunt-tasks": "~0.3.0"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@ -176,7 +176,7 @@ Build =
|
|||||||
''
|
''
|
||||||
|
|
||||||
if isOP and g.VIEW is 'index'
|
if isOP and g.VIEW is 'index'
|
||||||
pageNum = Math.floor Index.liveThreadIDs.indexOf(postID) / Index.threadsNumPerPage
|
pageNum = Index.liveThreadIDs.indexOf(postID) // Index.threadsNumPerPage
|
||||||
pageIcon = " <span class=page-num title='This thread is on page #{pageNum} in the original index.'>Page #{pageNum}</span>"
|
pageIcon = " <span class=page-num title='This thread is on page #{pageNum} in the original index.'>Page #{pageNum}</span>"
|
||||||
replyLink = " <span>[<a href='/#{boardID}/res/#{threadID}' class=replylink>Reply</a>]</span>"
|
replyLink = " <span>[<a href='/#{boardID}/res/#{threadID}' class=replylink>Reply</a>]</span>"
|
||||||
else
|
else
|
||||||
@ -284,7 +284,7 @@ Build =
|
|||||||
|
|
||||||
postCount = data.replies + 1
|
postCount = data.replies + 1
|
||||||
fileCount = data.images + !!data.ext
|
fileCount = data.images + !!data.ext
|
||||||
pageCount = Math.floor Index.liveThreadIDs.indexOf(thread.ID) / Index.threadsNumPerPage
|
pageCount = Index.liveThreadIDs.indexOf(thread.ID) // Index.threadsNumPerPage
|
||||||
|
|
||||||
subject = if thread.OP.info.subject
|
subject = if thread.OP.info.subject
|
||||||
"<div class='subject'>#{thread.OP.info.subject}</div>"
|
"<div class='subject'>#{thread.OP.info.subject}</div>"
|
||||||
|
|||||||
@ -188,7 +188,7 @@ Get =
|
|||||||
|
|
||||||
comment = bq.innerHTML
|
comment = bq.innerHTML
|
||||||
# greentext
|
# greentext
|
||||||
.replace(/(^|>)(>[^<$]*)(<|$)/g, '$1<span class=quote>$2</span>$3')
|
.replace /(^|>)(>[^<$]*)(<|$)/g, '$1<span class=quote>$2</span>$3'
|
||||||
# quotes
|
# quotes
|
||||||
.replace /((>){2}(>\/[a-z\d]+\/)?\d+)/g, '<span class=deadlink>$1</span>'
|
.replace /((>){2}(>\/[a-z\d]+\/)?\d+)/g, '<span class=deadlink>$1</span>'
|
||||||
|
|
||||||
|
|||||||
@ -344,7 +344,7 @@ Index =
|
|||||||
threadRoot = Build.thread g.BOARD, threadData
|
threadRoot = Build.thread g.BOARD, threadData
|
||||||
Index.nodes.push threadRoot, $.el 'hr'
|
Index.nodes.push threadRoot, $.el 'hr'
|
||||||
if thread = g.BOARD.threads[threadData.no]
|
if thread = g.BOARD.threads[threadData.no]
|
||||||
thread.setPage Math.floor i / Index.threadsNumPerPage
|
thread.setPage i // Index.threadsNumPerPage
|
||||||
thread.setCount 'post', threadData.replies + 1, threadData.bumplimit
|
thread.setCount 'post', threadData.replies + 1, threadData.bumplimit
|
||||||
thread.setCount 'file', threadData.images + !!threadData.ext, threadData.imagelimit
|
thread.setCount 'file', threadData.images + !!threadData.ext, threadData.imagelimit
|
||||||
thread.setStatus 'Sticky', !!threadData.sticky
|
thread.setStatus 'Sticky', !!threadData.sticky
|
||||||
@ -394,8 +394,8 @@ Index =
|
|||||||
Main.callbackNodes Post, posts
|
Main.callbackNodes Post, posts
|
||||||
buildCatalogViews: ->
|
buildCatalogViews: ->
|
||||||
threads = Index.sortedNodes
|
threads = Index.sortedNodes
|
||||||
.filter((n, i) -> !(i % 2))
|
.filter (n, i) -> !(i % 2)
|
||||||
.map((threadRoot) -> Get.threadFromRoot threadRoot)
|
.map (threadRoot) -> Get.threadFromRoot threadRoot
|
||||||
.filter (thread) -> !thread.isHidden
|
.filter (thread) -> !thread.isHidden
|
||||||
catalogThreads = []
|
catalogThreads = []
|
||||||
for thread in threads when !thread.catalogView
|
for thread in threads when !thread.catalogView
|
||||||
@ -408,8 +408,8 @@ Index =
|
|||||||
sortedThreadIDs = Index.liveThreadIDs
|
sortedThreadIDs = Index.liveThreadIDs
|
||||||
when 'lastreply'
|
when 'lastreply'
|
||||||
sortedThreadIDs = [Index.liveThreadData...].sort((a, b) ->
|
sortedThreadIDs = [Index.liveThreadData...].sort((a, b) ->
|
||||||
a = a.last_replies[a.last_replies.length - 1] if 'last_replies' of a
|
[..., a] = a.last_replies if 'last_replies' of a
|
||||||
b = b.last_replies[b.last_replies.length - 1] if 'last_replies' of b
|
[..., b] = b.last_replies if 'last_replies' of b
|
||||||
b.no - a.no
|
b.no - a.no
|
||||||
).map (data) -> data.no
|
).map (data) -> data.no
|
||||||
when 'birth'
|
when 'birth'
|
||||||
|
|||||||
@ -191,7 +191,7 @@ UI = do ->
|
|||||||
# prevent text selection
|
# prevent text selection
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if isTouching = e.type is 'touchstart'
|
if isTouching = e.type is 'touchstart'
|
||||||
e = e.changedTouches[e.changedTouches.length - 1]
|
[..., e] = e.changedTouches
|
||||||
# distance from pointer to el edge is constant; calculate it here.
|
# distance from pointer to el edge is constant; calculate it here.
|
||||||
el = $.x 'ancestor::div[contains(@class,"dialog")][1]', @
|
el = $.x 'ancestor::div[contains(@class,"dialog")][1]', @
|
||||||
rect = el.getBoundingClientRect()
|
rect = el.getBoundingClientRect()
|
||||||
|
|||||||
@ -76,7 +76,7 @@ QR.cooldown =
|
|||||||
if isReply is cooldown.isReply
|
if isReply is cooldown.isReply
|
||||||
# Only cooldowns relevant to this post can set the seconds variable:
|
# Only cooldowns relevant to this post can set the seconds variable:
|
||||||
# reply cooldown with a reply, thread cooldown with a thread
|
# reply cooldown with a reply, thread cooldown with a thread
|
||||||
elapsed = Math.floor (now - start) / $.SECOND
|
elapsed = (now - start) // $.SECOND
|
||||||
continue if elapsed < 0 # clock changed since then?
|
continue if elapsed < 0 # clock changed since then?
|
||||||
type = unless isReply
|
type = unless isReply
|
||||||
'thread'
|
'thread'
|
||||||
@ -91,7 +91,7 @@ QR.cooldown =
|
|||||||
seconds = Math.max seconds, types[type] - elapsed
|
seconds = Math.max seconds, types[type] - elapsed
|
||||||
|
|
||||||
if seconds and Conf['Cooldown Prediction'] and hasFile and upSpd
|
if seconds and Conf['Cooldown Prediction'] and hasFile and upSpd
|
||||||
seconds -= Math.floor post.file.size / upSpd * upSpdAccuracy
|
seconds -= post.file.size // (upSpd * upSpdAccuracy)
|
||||||
seconds = Math.max seconds, 0
|
seconds = Math.max seconds, 0
|
||||||
# Update the status when we change posting type.
|
# Update the status when we change posting type.
|
||||||
# Don't get stuck at some random number.
|
# Don't get stuck at some random number.
|
||||||
|
|||||||
@ -35,7 +35,7 @@ QR.post = class
|
|||||||
else
|
else
|
||||||
'new'
|
'new'
|
||||||
|
|
||||||
prev = QR.posts[QR.posts.length - 1]
|
[..., prev] = QR.posts
|
||||||
QR.posts.push @
|
QR.posts.push @
|
||||||
@nodes.spoiler.checked = @spoiler = if prev and Conf['Remember Spoiler']
|
@nodes.spoiler.checked = @spoiler = if prev and Conf['Remember Spoiler']
|
||||||
prev.spoiler
|
prev.spoiler
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user