main.js: a bit more sane code

This commit is contained in:
czaks 2016-05-05 14:38:24 +02:00
parent 6991ca270e
commit 02c3c28a16
6 changed files with 16 additions and 14 deletions

View file

@ -79,8 +79,8 @@ watchlist.add = function(sel) {
} else {
postCount = $(sel).parents('.op').siblings('.post').length+1;
}
//Grab the reply link.
var threadLink = $(sel).siblings('a:contains("['+_('Reply')+']")').attr('href');
//Grab the reply link.;
var threadLink = $(sel).siblings('a:not(.watchThread)').last().attr('href');
//Figure out the thread name. If anon, use the thread id.
if ($(sel).parent().find('.subject').length) {
threadName = $(sel).parent().find('.subject').text().substring(0,20);