From c5ca6eb00ebb32c3f08a12e7e0c029f77481fd8c Mon Sep 17 00:00:00 2001 From: ccd0 Date: Mon, 25 May 2015 19:25:31 -0700 Subject: [PATCH] Fix calling of prettyPrintOne before it has been loaded. --- src/Miscellaneous/Fourchan.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Miscellaneous/Fourchan.coffee b/src/Miscellaneous/Fourchan.coffee index a2cfc9fbf..5dd401e1a 100755 --- a/src/Miscellaneous/Fourchan.coffee +++ b/src/Miscellaneous/Fourchan.coffee @@ -60,9 +60,10 @@ Fourchan = code: -> return if @isClone - for pre, i in $$('.prettyprint', @nodes.comment) when not $.hasClass(pre, 'prettyprinted') - $.event 'prettyprint', {ID: @fullID, i: i, html: pre.innerHTML}, window - return + $.ready => + for pre, i in $$('.prettyprint', @nodes.comment) when not $.hasClass(pre, 'prettyprinted') + $.event 'prettyprint', {ID: @fullID, i: i, html: pre.innerHTML}, window + return math: -> return if (@isClone and doc.contains @origin.nodes.root) or !$ '.math', @nodes.comment