This commit is contained in:
James Campos 2011-08-23 18:25:27 -07:00
parent 16b3a8cbd9
commit a784a608ec
2 changed files with 7 additions and 18 deletions

View File

@ -1881,19 +1881,13 @@
watch: function(thread, id) {
var el, props, watched, _name;
el = $('span.filetitle', thread);
props = {
href: "/" + g.BOARD + "/res/" + id
};
if (!el.textContent) {
el = $('blockquote', thread);
if (el.textContent) {
props.textContent = "/" + g.BOARD + "/ - " + ($.innerText(el).slice(0, 25));
} else {
props.textContent = d.title;
}
} else {
props.textContent = "/" + g.BOARD + "/ - " + ($.innerText(el).slice(0, 25));
}
props = {
href: "/" + g.BOARD + "/res/" + id,
textContent: el.textContent ? "/" + g.BOARD + "/ - " + ($.innerText(el).slice(0, 25)) : d.title
};
watched = $.get('watched', {});
watched[_name = g.BOARD] || (watched[_name] = {});
watched[g.BOARD][id] = props;

View File

@ -1541,16 +1541,11 @@ watcher =
watch: (thread, id) ->
el = $ 'span.filetitle', thread
props =
href: "/#{g.BOARD}/res/#{id}"
if not el.textContent
el = $ 'blockquote', thread
if el.textContent
props.textContent = "/#{g.BOARD}/ - #{$.innerText(el)[...25]}"
else
props.textContent = d.title
else
props.textContent = "/#{g.BOARD}/ - #{$.innerText(el)[...25]}"
props =
href: "/#{g.BOARD}/res/#{id}"
textContent: if el.textContent then "/#{g.BOARD}/ - #{$.innerText(el)[...25]}" else d.title
watched = $.get 'watched', {}
watched[g.BOARD] or= {}