fix jsMath in catalog

This commit is contained in:
ccd0 2014-09-19 00:23:56 -07:00
parent 9dd83dcb1f
commit d70c7c0e51
2 changed files with 7 additions and 3 deletions

View File

@ -12,4 +12,5 @@ class CatalogThread
postCount: $ '.post-count', root postCount: $ '.post-count', root
fileCount: $ '.file-count', root fileCount: $ '.file-count', root
pageCount: $ '.page-count', root pageCount: $ '.page-count', root
comment: $ '.comment', root
@thread.catalogView = @ @thread.catalogView = @

View File

@ -21,7 +21,7 @@ Fourchan =
if (!jsMath) return; if (!jsMath) return;
if (jsMath.loaded) { if (jsMath.loaded) {
// process one post // process one post
jsMath.ProcessBeforeShowing(document.getElementById(e.detail)); jsMath.ProcessBeforeShowing(e.target);
} else if (jsMath.Autoload && jsMath.Autoload.checked) { } else if (jsMath.Autoload && jsMath.Autoload.checked) {
// load jsMath and process whole document // load jsMath and process whole document
jsMath.Autoload.Script.Push('ProcessBeforeShowing', [null]); jsMath.Autoload.Script.Push('ProcessBeforeShowing', [null]);
@ -32,6 +32,9 @@ Fourchan =
Post.callbacks.push Post.callbacks.push
name: 'Parse /sci/ math' name: 'Parse /sci/ math'
cb: @math cb: @math
CatalogThread.callbacks.push
name: 'Parse /sci/ math'
cb: @math
code: -> code: ->
return if @isClone return if @isClone
apply = (e) -> apply = (e) ->
@ -44,8 +47,8 @@ Fourchan =
return return
math: -> math: ->
return if (@isClone and doc.contains @origin.nodes.root) or !$ '.math', @nodes.comment return if (@isClone and doc.contains @origin.nodes.root) or !$ '.math', @nodes.comment
$.asap (=> doc.contains @nodes.post), => $.asap (=> doc.contains @nodes.comment), =>
$.event 'jsmath', @nodes.post.id, window $.event 'jsmath', null, @nodes.comment
parseThread: (threadID, offset, limit) -> parseThread: (threadID, offset, limit) ->
# Fix /sci/ # Fix /sci/
# Fix /g/ # Fix /g/