fix jsMath in catalog
This commit is contained in:
parent
9dd83dcb1f
commit
d70c7c0e51
@ -12,4 +12,5 @@ class CatalogThread
|
||||
postCount: $ '.post-count', root
|
||||
fileCount: $ '.file-count', root
|
||||
pageCount: $ '.page-count', root
|
||||
comment: $ '.comment', root
|
||||
@thread.catalogView = @
|
||||
|
||||
@ -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/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user