Update prettyPrinting support.
This commit is contained in:
parent
e0a44bcb69
commit
10c8ccc90d
@ -32,13 +32,9 @@ Fourchan =
|
|||||||
cb: @math
|
cb: @math
|
||||||
code: ->
|
code: ->
|
||||||
return if @isClone
|
return if @isClone
|
||||||
for pre in $$ '.prettyprint', @nodes.comment
|
for pre in $$ '.prettyprint:not(.prettyprinted)', @nodes.comment
|
||||||
# Don't pretty print twice:
|
$.event 'prettyprint', pre, window
|
||||||
# Might need a better way to detect if a .prettyprint
|
$.addClass pre, 'prettyprinted'
|
||||||
# is already pretty-printed. We can't just look for spans
|
|
||||||
# since 4chan inserts its quotes and whatnot inside.
|
|
||||||
unless $ '.pln', pre
|
|
||||||
$.event 'prettyprint', pre, window
|
|
||||||
return
|
return
|
||||||
math: ->
|
math: ->
|
||||||
return if @isClone or !$ '.math', @nodes.comment
|
return if @isClone or !$ '.math', @nodes.comment
|
||||||
|
|||||||
@ -15,7 +15,7 @@ Quotify =
|
|||||||
return
|
return
|
||||||
|
|
||||||
parseDeadlink: (deadlink) ->
|
parseDeadlink: (deadlink) ->
|
||||||
if deadlink.parentNode.className is 'prettyprint'
|
if $.hasClass deadlink.parentNode, 'prettyprint'
|
||||||
# Don't quotify deadlinks inside code tags,
|
# Don't quotify deadlinks inside code tags,
|
||||||
# un-`span` them.
|
# un-`span` them.
|
||||||
# This won't be necessary once 4chan
|
# This won't be necessary once 4chan
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user