temporary old-syntax support; also, parent() makes sense for default and r34 themes

This commit is contained in:
Shish
2012-02-22 14:14:40 +00:00
parent 169ae5f590
commit 2e66ca44d7
2 changed files with 5 additions and 5 deletions

View File

@ -53,9 +53,9 @@ $(document).ready(function() {
}
$(".comment_link").each(function(idx, elm) {
var target_id = $(elm).text().match(/#c\d+/);
if(target_id && $(target_id)) {
var target_name = $(target_id+" .username").html();
var target_id = $(elm).text().match(/#c?(\d+)/);
if(target_id && $("#c"+target_id[1])) {
var target_name = $("#c"+target_id[1]+" .username").html();
$(elm).html("@"+target_name);
}
});
@ -131,5 +131,5 @@ function replyTo(imageId, commentId) {
box.focus();
box.val(box.val() + text);
$("#c"+commentId).effect("highlight", {}, 5000);
$("#c"+commentId).parent().effect("highlight", {}, 5000);
}