As of CoffeeScript 1.9.0, parameters like @x are no longer available as x.

This commit is contained in:
ccd0 2015-02-22 11:05:04 -08:00
parent c97ec41ee2
commit bb3cbf5822
5 changed files with 12 additions and 12 deletions

View File

@ -2,9 +2,9 @@ class Clone extends Post
constructor: (@origin, @context, contractThumb) ->
for key in ['ID', 'fullID', 'board', 'thread', 'info', 'quotes', 'isReply']
# Copy or point to the origin's key value.
@[key] = origin[key]
@[key] = @origin[key]
{nodes} = origin
{nodes} = @origin
root = if contractThumb
@cloneWithoutVideo nodes.root
else
@ -50,11 +50,11 @@ class Clone extends Post
@parseQuotes()
if origin.file
if @origin.file
# Copy values, point to relevant elements.
# See comments in Post's constructor.
@file = {}
for key, val of origin.file
for key, val of @origin.file
@file[key] = val
file = $ '.file', post
@file.text = file.firstElementChild
@ -67,9 +67,9 @@ class Clone extends Post
# Contract thumbnails in quote preview
ImageExpand.contract @ if contractThumb
@isDead = true if origin.isDead
@isDead = true if @origin.isDead
@isClone = true
root.dataset.clone = origin.clones.push(@) - 1
root.dataset.clone = @origin.clones.push(@) - 1
cloneWithoutVideo: (node) ->
if node.tagName is 'VIDEO' and !node.dataset.md5 # (exception for WebM thumbnails)

View File

@ -2,8 +2,8 @@ class DataBoard
@keys = ['hiddenThreads', 'hiddenPosts', 'lastReadPosts', 'yourPosts', 'watchedThreads', 'customTitles']
constructor: (@key, sync, dontClean) ->
@data = Conf[key]
$.sync key, @onSync
@data = Conf[@key]
$.sync @key, @onSync
@clean() unless dontClean
return unless sync
# Chrome also fires the onChanged callback on the current tab,

View File

@ -91,7 +91,7 @@ class Post
@isRebuilt = true
@clones = g.posts[@fullID].clones
clone.origin = @ for clone in @clones
g.posts.push @fullID, thread.posts.push @, board.posts.push @, @
g.posts.push @fullID, @thread.posts.push @, @board.posts.push @, @
parseComment: ->
# Merge text nodes and remove empty ones.

View File

@ -18,7 +18,7 @@ class Thread
@OP = null
@catalogView = null
g.threads.push @fullID, board.threads.push @, @
g.threads.push @fullID, @board.threads.push @, @
setPage: (pageNum) ->
{info, quote} = @OP.nodes

View File

@ -152,8 +152,8 @@ QR.post = class
return
setFile: (@file, el) ->
@filename = file.name
@filesize = $.bytesToString file.size
@filename = @file.name
@filesize = $.bytesToString @file.size
@nodes.label.hidden = false if QR.spoiler
QR.captcha.onPostChange()
URL.revokeObjectURL @URL