As of CoffeeScript 1.9.0, parameters like @x are no longer available as x.
This commit is contained in:
parent
c97ec41ee2
commit
bb3cbf5822
@ -2,9 +2,9 @@ class Clone extends Post
|
|||||||
constructor: (@origin, @context, contractThumb) ->
|
constructor: (@origin, @context, contractThumb) ->
|
||||||
for key in ['ID', 'fullID', 'board', 'thread', 'info', 'quotes', 'isReply']
|
for key in ['ID', 'fullID', 'board', 'thread', 'info', 'quotes', 'isReply']
|
||||||
# Copy or point to the origin's key value.
|
# Copy or point to the origin's key value.
|
||||||
@[key] = origin[key]
|
@[key] = @origin[key]
|
||||||
|
|
||||||
{nodes} = origin
|
{nodes} = @origin
|
||||||
root = if contractThumb
|
root = if contractThumb
|
||||||
@cloneWithoutVideo nodes.root
|
@cloneWithoutVideo nodes.root
|
||||||
else
|
else
|
||||||
@ -50,11 +50,11 @@ class Clone extends Post
|
|||||||
|
|
||||||
@parseQuotes()
|
@parseQuotes()
|
||||||
|
|
||||||
if origin.file
|
if @origin.file
|
||||||
# Copy values, point to relevant elements.
|
# Copy values, point to relevant elements.
|
||||||
# See comments in Post's constructor.
|
# See comments in Post's constructor.
|
||||||
@file = {}
|
@file = {}
|
||||||
for key, val of origin.file
|
for key, val of @origin.file
|
||||||
@file[key] = val
|
@file[key] = val
|
||||||
file = $ '.file', post
|
file = $ '.file', post
|
||||||
@file.text = file.firstElementChild
|
@file.text = file.firstElementChild
|
||||||
@ -67,9 +67,9 @@ class Clone extends Post
|
|||||||
# Contract thumbnails in quote preview
|
# Contract thumbnails in quote preview
|
||||||
ImageExpand.contract @ if contractThumb
|
ImageExpand.contract @ if contractThumb
|
||||||
|
|
||||||
@isDead = true if origin.isDead
|
@isDead = true if @origin.isDead
|
||||||
@isClone = true
|
@isClone = true
|
||||||
root.dataset.clone = origin.clones.push(@) - 1
|
root.dataset.clone = @origin.clones.push(@) - 1
|
||||||
|
|
||||||
cloneWithoutVideo: (node) ->
|
cloneWithoutVideo: (node) ->
|
||||||
if node.tagName is 'VIDEO' and !node.dataset.md5 # (exception for WebM thumbnails)
|
if node.tagName is 'VIDEO' and !node.dataset.md5 # (exception for WebM thumbnails)
|
||||||
|
|||||||
@ -2,8 +2,8 @@ class DataBoard
|
|||||||
@keys = ['hiddenThreads', 'hiddenPosts', 'lastReadPosts', 'yourPosts', 'watchedThreads', 'customTitles']
|
@keys = ['hiddenThreads', 'hiddenPosts', 'lastReadPosts', 'yourPosts', 'watchedThreads', 'customTitles']
|
||||||
|
|
||||||
constructor: (@key, sync, dontClean) ->
|
constructor: (@key, sync, dontClean) ->
|
||||||
@data = Conf[key]
|
@data = Conf[@key]
|
||||||
$.sync key, @onSync
|
$.sync @key, @onSync
|
||||||
@clean() unless dontClean
|
@clean() unless dontClean
|
||||||
return unless sync
|
return unless sync
|
||||||
# Chrome also fires the onChanged callback on the current tab,
|
# Chrome also fires the onChanged callback on the current tab,
|
||||||
|
|||||||
@ -91,7 +91,7 @@ class Post
|
|||||||
@isRebuilt = true
|
@isRebuilt = true
|
||||||
@clones = g.posts[@fullID].clones
|
@clones = g.posts[@fullID].clones
|
||||||
clone.origin = @ for clone in @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: ->
|
parseComment: ->
|
||||||
# Merge text nodes and remove empty ones.
|
# Merge text nodes and remove empty ones.
|
||||||
|
|||||||
@ -18,7 +18,7 @@ class Thread
|
|||||||
@OP = null
|
@OP = null
|
||||||
@catalogView = null
|
@catalogView = null
|
||||||
|
|
||||||
g.threads.push @fullID, board.threads.push @, @
|
g.threads.push @fullID, @board.threads.push @, @
|
||||||
|
|
||||||
setPage: (pageNum) ->
|
setPage: (pageNum) ->
|
||||||
{info, quote} = @OP.nodes
|
{info, quote} = @OP.nodes
|
||||||
|
|||||||
@ -152,8 +152,8 @@ QR.post = class
|
|||||||
return
|
return
|
||||||
|
|
||||||
setFile: (@file, el) ->
|
setFile: (@file, el) ->
|
||||||
@filename = file.name
|
@filename = @file.name
|
||||||
@filesize = $.bytesToString file.size
|
@filesize = $.bytesToString @file.size
|
||||||
@nodes.label.hidden = false if QR.spoiler
|
@nodes.label.hidden = false if QR.spoiler
|
||||||
QR.captcha.onPostChange()
|
QR.captcha.onPostChange()
|
||||||
URL.revokeObjectURL @URL
|
URL.revokeObjectURL @URL
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user