fix jsMath in catalog
This commit is contained in:
parent
9dd83dcb1f
commit
d70c7c0e51
@ -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 = @
|
||||||
|
|||||||
@ -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/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user