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