Merge from Appchan X: src/General/lib
deferred: changes to Callbacks.execute
This commit is contained in:
parent
7a9546949d
commit
b01c372c1a
@ -215,7 +215,7 @@ $.one = (el, events, handler) ->
|
||||
$.event = (event, detail, root=d) ->
|
||||
<% if (type === 'userscript') { %>
|
||||
if detail? and typeof cloneInto is 'function'
|
||||
detail = cloneInto detail, document.defaultView
|
||||
detail = cloneInto detail, d.defaultView
|
||||
<% } %>
|
||||
root.dispatchEvent new CustomEvent event, {bubbles: true, detail}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ class Board
|
||||
toString: -> @ID
|
||||
|
||||
constructor: (@ID) ->
|
||||
@threads = new SimpleDict
|
||||
@posts = new SimpleDict
|
||||
@threads = new SimpleDict()
|
||||
@posts = new SimpleDict()
|
||||
|
||||
g.boards[@] = @
|
||||
g.boards[@] = @
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
class CatalogThread
|
||||
@callbacks = new Callbacks 'CatalogThread'
|
||||
@callbacks = new Callbacks 'Catalog Thread'
|
||||
toString: -> @ID
|
||||
|
||||
constructor: (root, @thread) ->
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
class Connection
|
||||
constructor: (@target, @origin, @cb) ->
|
||||
$.on window, 'message', @onMessage.bind @
|
||||
$.on window, 'message', @onMessage
|
||||
|
||||
send: (data) ->
|
||||
send: (data) =>
|
||||
@target.postMessage "#{g.NAMESPACE}#{JSON.stringify data}", @origin
|
||||
|
||||
onMessage: (e) ->
|
||||
onMessage: (e) =>
|
||||
return unless e.source is @target and
|
||||
e.origin is @origin and
|
||||
typeof e.data is 'string' and
|
||||
|
||||
@ -234,10 +234,9 @@ class Post
|
||||
for clone in @clones
|
||||
clone.resurrect()
|
||||
|
||||
for quotelink in Get.allQuotelinksLinkingTo @
|
||||
if $.hasClass quotelink, 'deadlink'
|
||||
quotelink.textContent = quotelink.textContent.replace '\u00A0(Dead)', ''
|
||||
$.rmClass quotelink, 'deadlink'
|
||||
for quotelink in Get.allQuotelinksLinkingTo @ when $.hasClass quotelink, 'deadlink'
|
||||
quotelink.textContent = quotelink.textContent.replace '\u00A0(Dead)', ''
|
||||
$.rmClass quotelink, 'deadlink'
|
||||
return
|
||||
|
||||
collect: ->
|
||||
|
||||
@ -4,7 +4,7 @@ class Thread
|
||||
|
||||
constructor: (@ID, @board) ->
|
||||
@fullID = "#{@board}.#{@ID}"
|
||||
@posts = new SimpleDict
|
||||
@posts = new SimpleDict()
|
||||
@isDead = false
|
||||
@isHidden = false
|
||||
@isOnTop = false
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user