diff --git a/4chan_x.user.js b/4chan_x.user.js
index 69ee1ea26..8abbc11ca 100644
--- a/4chan_x.user.js
+++ b/4chan_x.user.js
@@ -3099,35 +3099,30 @@
}
},
parseArchivedPost: function(req, board, postID, root, cb) {
- var bq, br, capcode, data, email, file, filesize, isOP, nameBlock, p, pc, pi, piM, span;
+ var bq, br, capcode, data, email, file, filesize, isOP, name, nameBlock, pc, pi, piM, span, subject, threadID, trip;
data = JSON.parse(req.response);
+ $.addClass(root, 'archivedPost');
if (data.error) {
root.textContent = data.error;
return;
}
- isOP = postID === data.thread_num;
- pc = $.el('div', {
- id: "pc" + postID,
- className: isOP ? 'postContainer opContainer' : 'postContainer replyContainer'
- });
- p = $.el('div', {
- id: "p" + postID,
- className: isOP ? 'post op' : 'post reply'
- });
- $.add(pc, p);
+ threadID = data.thread_num;
+ isOP = postID === threadID;
+ name = data.name, trip = data.trip;
+ subject = data.title;
piM = $.el('div', {
id: "pim" + postID,
className: 'postInfoM mobile',
- innerHTML: "
" + data.fourchan_date + "
No." + postID + ""
+ innerHTML: "
" + data.fourchan_date + "
No." + postID + ""
});
- $('.name', piM).textContent = data.name;
- $('.subject', piM).textContent = data.title;
+ $('.name', piM).textContent = name;
+ $('.subject', piM).textContent = subject;
br = $('br', piM);
- if (data.trip) {
+ if (trip) {
$.before(br, [
$.tn(' '), $.el('span', {
className: 'postertrip',
- textContent: data.trip
+ textContent: trip
})
]);
}
@@ -3149,9 +3144,9 @@
pi = $.el('div', {
id: "pi" + postID,
className: 'postInfo desktop',
- innerHTML: " data.fourchan_date No." + postID + "" + (isOP ? ' ' : '') + " "
+ innerHTML: " data.fourchan_date No." + postID + "" + (isOP ? ' ' : '') + " "
});
- $('.subject', pi).textContent = data.title;
+ $('.subject', pi).textContent = subject;
nameBlock = $('.nameBlock', pi);
if (data.email) {
email = $.el('a', {
@@ -3165,11 +3160,11 @@
className: 'name',
textContent: data.name
}));
- if (data.trip) {
+ if (trip) {
$.add(nameBlock, [
$.tn(' '), $.el('span', {
className: 'postertrip',
- textContent: data.trip
+ textContent: trip
})
]);
}
@@ -3223,7 +3218,12 @@
}
});
bq.innerHTML = bq.innerHTML.replace(/(^|>)(>[^<$]+)(<|$)/g, '$1$2$3');
- $.add(p, [piM, pi, bq]);
+ pc = $.el('div', {
+ id: "pc" + postID,
+ className: "postContainer " + (isOP ? 'op' : 'reply') + "Container",
+ innerHTML: "