diff --git a/src/General/lib/post.class b/src/General/lib/post.class index 2ddbe223a..bf9d388e4 100755 --- a/src/General/lib/post.class +++ b/src/General/lib/post.class @@ -15,10 +15,14 @@ class Post el.removeAttribute 'rel' for el in $$ 'img[src]', root2 el.src = el.src.replace /^(\w+:\/\/)[0-2](\.t\.4cdn\.org\/)/, '$10$2' + Fourchan.code.call nodes: comment: $ '.postMessage', root2 + for el in $$ 'pre[style=""]', root2 + el.removeAttribute 'style' textNodes = $.X './/text()', root2 i = 0 while node = textNodes.snapshotItem i++ node.data = node.data.replace /\s+/g, ' ' + $.rm node if node.data is '' @normalizedOriginal = root2 <% } %> diff --git a/src/Miscellaneous/Fourchan.coffee b/src/Miscellaneous/Fourchan.coffee index 5d5159f51..0014eb823 100755 --- a/src/Miscellaneous/Fourchan.coffee +++ b/src/Miscellaneous/Fourchan.coffee @@ -34,7 +34,9 @@ Fourchan = cb: @math code: -> return if @isClone - apply = (e) -> pre.innerHTML = e.detail + apply = (e) -> + pre.innerHTML = e.detail + $.addClass pre, 'prettyprinted' $.on window, 'prettyprint:cb', apply for pre in $$ '.prettyprint:not(.prettyprinted)', @nodes.comment $.event 'prettyprint', pre.innerHTML, window