http://archive.is/N5nrL
To reformat an archives 4 chan post, paste this code into the DEV console of your browser.
(function () {
String.prototype.SubstrAfter = function (start) { return this.substr(this.indexOf(start) + start.length); };
var js = document.createElement('script');
js.type = 'text/javascript';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(js);
js.onload = function () {
Z = jQuery.noConflict(true);
Z(document).ready(function () {
Z(`<style type='text/css'>
.opComment { color: #000033 !important;}
.referencedComment {
background-color: #ccbbbb;
color: #662222 !important;
margin: -.5em 0 -0.5em 1em;
padding: .6em;
}
.greenText{
color:rgb(80, 133, 24);
}
.referencedComment .greenText {
background-color: #aa9999;
color: #B9F73A !important;
margin: .5em 0 -1.0em 1em;
padding: .25em;
}
</style>`).appendTo('head');
Z('#CONTENT div.html1').css('min-height', '');
Z('#CONTENT .html>div.body').first().replaceWith(Z('#CONTENT .html>div.body>form'));
Z.OpId = Z('form>div>div>[style="text-align:left;display:inline;"] span[title="Highlight posts by this ID"]').addClass('thing').eq(0).text();
Z('form>div>div>div[style="text-align:left;"]').addClass('thing');
Z.AllPosts = Z('.thing');
Z.AllComments = Z.AllPosts.find('blockquote').addClass('commentReply');
Z.AllGreenTexts = Z.AllComments.find('span[style="text-align:left;color:rgb(120, 153, 34);"]')
.addClass('.greenText').each(function (i, e) { Z(e).replaceWith('<div class="greenText">' + e.innerHTML + '</div>'); });
Z.AllPostHeaders = Z.AllPosts.find('div[style="text-align:left;width:auto;display:inline;"]').addClass('postHeader');
Z.AllPostIds = Z.AllPostHeaders.find('span>span>span[title^="Highlight"]').addClass('postId');
Z.AllPostNumbers = Z.AllPostHeaders.find('span>a[title^="Reply"]').addClass('postNumber');
Z.OpPosts = Z.AllPostIds.filter(':contains("' + Z.OpId + '")').parents('.thing').addClass('originalPoster');
Z.OpPosts.find('.commentReply').addClass('opComment');
Z.NotOpPosts = Z.AllPosts.not(Z.OpPosts);
Z.NotOpPosts.find('.commentReply').addClass('reply');
Z.NotOpPosts.hide(); //Uncomment to see all comments
Z.CommentLookupByNumber = {};
Z.AllPostNumbers.each(function () { Z.CommentLookupByNumber[this.innerText] = Z(this).parents('.thing').find('.commentReply').get(0); });
Z.OpPosts.find('blockquote>a').each(function (i, e) {
var refPost = Z.CommentLookupByNumber[e.href.SubstrAfter('%23p')];
if (refPost) {
var refComment = Z('<div class="referencedComment">' + refPost.innerHTML + '</div>');
Z(this).replaceWith(refComment);
}
});
});
}
js.src = 'https://code.jquery.com/jquery-2.2.4.min.js';
})();