Personal choices

This commit is contained in:
Zixaphir 2013-08-06 12:14:23 -07:00
parent fe20262e5e
commit 9b5cb52619
3 changed files with 6 additions and 23 deletions

View File

@ -8627,15 +8627,7 @@
return $.replace(span, a);
},
text: function(status, posts, files) {
var text;
text = [status];
text.push("" + posts + " post" + (posts > 1 ? 's' : ''));
if (+files) {
text.push("and " + files + " image repl" + (files > 1 ? 'ies' : 'y'));
}
text.push(status === '-' ? 'shown' : 'omitted');
return text.join(' ') + '.';
return ("" + status + " " + posts + " post" + (posts > 1 ? 's' : '')) + (+files ? " and " + files + " image repl" + (files > 1 ? 'ies' : 'y') : "") + (" " + (status === '-' ? 'shown' : 'omitted') + ".");
},
cbToggle: function() {
return ExpandThread.toggle(Get.threadFromRoot(this.parentNode));

View File

@ -8612,15 +8612,7 @@
return $.replace(span, a);
},
text: function(status, posts, files) {
var text;
text = [status];
text.push("" + posts + " post" + (posts > 1 ? 's' : ''));
if (+files) {
text.push("and " + files + " image repl" + (files > 1 ? 'ies' : 'y'));
}
text.push(status === '-' ? 'shown' : 'omitted');
return text.join(' ') + '.';
return ("" + status + " " + posts + " post" + (posts > 1 ? 's' : '')) + (+files ? " and " + files + " image repl" + (files > 1 ? 'ies' : 'y') : "") + (" " + (status === '-' ? 'shown' : 'omitted') + ".");
},
cbToggle: function() {
return ExpandThread.toggle(Get.threadFromRoot(this.parentNode));

View File

@ -5,6 +5,7 @@ ExpandThread =
Thread::callbacks.push
name: 'Thread Expansion'
cb: @node
node: ->
return unless span = $.x 'following-sibling::span[contains(@class,"summary")][1]', @OP.nodes.root
[posts, files] = span.textContent.match /\d+/g
@ -16,11 +17,9 @@ ExpandThread =
$.replace span, a
text: (status, posts, files) ->
text = [status]
text.push "#{posts} post#{if posts > 1 then 's' else ''}"
text.push "and #{files} image repl#{if files > 1 then 'ies' else 'y'}" if +files
text.push if status is '-' then 'shown' else 'omitted'
text.join(' ') + '.'
"#{status} #{posts} post#{if posts > 1 then 's' else ''}" +
(if +files then " and #{files} image repl#{if files > 1 then 'ies' else 'y'}" else "") +
" #{if status is '-' then 'shown' else 'omitted'}."
cbToggle: ->
ExpandThread.toggle Get.threadFromRoot @parentNode