diff --git a/4chan_x.user.js b/4chan_x.user.js
index 202d8f359..c42d21a9d 100644
--- a/4chan_x.user.js
+++ b/4chan_x.user.js
@@ -703,7 +703,11 @@
return false;
},
subject: function(post) {
- return $('.postInfo .subject', post.el).textContent || false;
+ var subject;
+ if (subject = $('.postInfo .subject', post.el)) {
+ return subject.textContent;
+ }
+ return false;
},
comment: function(post) {
var data, i, nodes, text, _i, _ref;
@@ -3752,6 +3756,7 @@
emailStart = '';
emailEnd = '';
}
+ subject = subject ? "" + subject + "" : '';
userID = !capcode && uniqueID ? (" (ID: ") + ("" + uniqueID + ") ") : '';
switch (capcode) {
case 'admin':
@@ -3818,7 +3823,7 @@
container = $.el('div', {
id: "pc" + postID,
className: "postContainer " + (isOP ? 'op' : 'reply') + "Container",
- innerHTML: (isOP ? '' : "
") + ("
") + ("
") + ("" + name + "") + tripcode + capcodeStart + capcode + userID + flag + sticky + closed + ("
" + subject + "") + ("" + date) + '
' + ("No.") + ("" + postID + "") + '' + '
' + (isOP ? fileHTML : '') + ("
") + ("
") + ("
" + (subject || '') + " ") + ("
") + emailStart + ("" + name + "") + tripcode + capcodeStart + emailEnd + capcode + userID + flag + sticky + closed + ' ' + ("
" + date + " ") + "
" + ("No.") + ("" + postID + "") + '' + '
' + (isOP ? '' : fileHTML) + ("
" + comment + "
") + '
'
+ innerHTML: (isOP ? '' : "") + ("
") + ("
") + ("" + name + "") + tripcode + capcodeStart + capcode + userID + flag + sticky + closed + ("
" + subject) + ("" + date) + '
' + ("No.") + ("" + postID + "") + '' + '
' + (isOP ? fileHTML : '') + ("
") + ("
") + ("" + subject + " ") + ("
") + emailStart + ("" + name + "") + tripcode + capcodeStart + emailEnd + capcode + userID + flag + sticky + closed + ' ' + ("
" + date + " ") + "
" + ("No.") + ("" + postID + "") + '' + '
' + (isOP ? '' : fileHTML) + ("
" + comment + "
") + '
'
});
_ref = $$('.quotelink', container);
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
diff --git a/script.coffee b/script.coffee
index bb4bff7ed..a0f1fd855 100644
--- a/script.coffee
+++ b/script.coffee
@@ -557,7 +557,9 @@ Filter =
return decodeURIComponent mail.href[7..]
false
subject: (post) ->
- $('.postInfo .subject', post.el).textContent or false
+ if subject = $ '.postInfo .subject', post.el
+ return subject.textContent
+ false
comment: (post) ->
text = []
# XPathResult.ORDERED_NODE_SNAPSHOT_TYPE is 7
@@ -2965,6 +2967,12 @@ Build =
emailStart = ''
emailEnd = ''
+ subject =
+ if subject
+ "