a few more tweaks from Mayhem
This commit is contained in:
parent
f52a625a2a
commit
63d7372ad2
@ -178,7 +178,7 @@ $.off = (el, events, handler) ->
|
|||||||
|
|
||||||
$.event = (event, detail, root=d) ->
|
$.event = (event, detail, root=d) ->
|
||||||
<% if (type === 'userscript') { %>
|
<% if (type === 'userscript') { %>
|
||||||
if typeof cloneInto is 'function'
|
if detail? and typeof cloneInto is 'function'
|
||||||
detail = cloneInto detail, document.defaultView
|
detail = cloneInto detail, document.defaultView
|
||||||
<% } %>
|
<% } %>
|
||||||
root.dispatchEvent new CustomEvent event, {bubbles: true, detail}
|
root.dispatchEvent new CustomEvent event, {bubbles: true, detail}
|
||||||
|
|||||||
@ -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('p' + e.detail));
|
jsMath.ProcessBeforeShowing(document.getElementById(e.detail));
|
||||||
} 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]);
|
||||||
@ -43,7 +43,7 @@ Fourchan =
|
|||||||
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.post), =>
|
||||||
$.event 'jsmath', @ID, window
|
$.event 'jsmath', @nodes.post.id, window
|
||||||
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