diff --git a/src/General/lib/clone.class b/src/General/lib/clone.class index a03d67d64..4ae25630b 100755 --- a/src/General/lib/clone.class +++ b/src/General/lib/clone.class @@ -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) diff --git a/src/General/lib/databoard.class b/src/General/lib/databoard.class index 9adaec980..a59ae8f46 100755 --- a/src/General/lib/databoard.class +++ b/src/General/lib/databoard.class @@ -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, diff --git a/src/General/lib/post.class b/src/General/lib/post.class index f2b87b31a..4501cd0f2 100755 --- a/src/General/lib/post.class +++ b/src/General/lib/post.class @@ -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. diff --git a/src/General/lib/thread.class b/src/General/lib/thread.class index f9741c7b0..1b182dde2 100755 --- a/src/General/lib/thread.class +++ b/src/General/lib/thread.class @@ -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 diff --git a/src/Posting/QR.post.coffee b/src/Posting/QR.post.coffee index 9d9aa1b6b..f13209bd1 100644 --- a/src/Posting/QR.post.coffee +++ b/src/Posting/QR.post.coffee @@ -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