From d70c7c0e5150683fc6dceb1e67c67d193e825204 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Fri, 19 Sep 2014 00:23:56 -0700 Subject: [PATCH] fix jsMath in catalog --- src/General/lib/catalogthread.class | 1 + src/Miscellaneous/Fourchan.coffee | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/General/lib/catalogthread.class b/src/General/lib/catalogthread.class index 0ae4a65b6..564f62bfb 100644 --- a/src/General/lib/catalogthread.class +++ b/src/General/lib/catalogthread.class @@ -12,4 +12,5 @@ class CatalogThread postCount: $ '.post-count', root fileCount: $ '.file-count', root pageCount: $ '.page-count', root + comment: $ '.comment', root @thread.catalogView = @ diff --git a/src/Miscellaneous/Fourchan.coffee b/src/Miscellaneous/Fourchan.coffee index 0014eb823..1e70fc2ce 100755 --- a/src/Miscellaneous/Fourchan.coffee +++ b/src/Miscellaneous/Fourchan.coffee @@ -21,7 +21,7 @@ Fourchan = if (!jsMath) return; if (jsMath.loaded) { // process one post - jsMath.ProcessBeforeShowing(document.getElementById(e.detail)); + jsMath.ProcessBeforeShowing(e.target); } else if (jsMath.Autoload && jsMath.Autoload.checked) { // load jsMath and process whole document jsMath.Autoload.Script.Push('ProcessBeforeShowing', [null]); @@ -32,6 +32,9 @@ Fourchan = Post.callbacks.push name: 'Parse /sci/ math' cb: @math + CatalogThread.callbacks.push + name: 'Parse /sci/ math' + cb: @math code: -> return if @isClone apply = (e) -> @@ -44,8 +47,8 @@ Fourchan = return math: -> return if (@isClone and doc.contains @origin.nodes.root) or !$ '.math', @nodes.comment - $.asap (=> doc.contains @nodes.post), => - $.event 'jsmath', @nodes.post.id, window + $.asap (=> doc.contains @nodes.comment), => + $.event 'jsmath', null, @nodes.comment parseThread: (threadID, offset, limit) -> # Fix /sci/ # Fix /g/