var thisId = $(this).attr('commentid');
$(this).insertAfter('#comment-' + thisId + ' .author strong:first').show();
});
- $('#the-comment-list').find('tr.comment, tr[id ^= "comment-"]').find('.column-author a[title ^= "http://"]').each(function () {
+ $('#the-comment-list').find('tr.comment, tr[id ^= "comment-"]').find('.column-author a[title ^= "http://"], .column-author a[title ^= "https://"]').each(function () {
var thisTitle = $(this).attr('title');
thisCommentId = $(this).parents('tr:first').attr('id').split("-");
});
$('.akismet_undo_link_removal').live('click', function () {
var thisId = $(this).attr('cid');
- var thisUrl = $(this).attr('href').replace("http://www.", "").replace("http://", "");
+ var thisUrl = $(this).attr('href');
var data = {
action: 'comment_author_reurl',
_wpnonce: WPAkismet.comment_author_url_nonce,
if (response) {
// Add "x" link
$("a[commentid='"+ thisId +"']").show();
- // Show link
- $("#author_comment_url_"+ thisId).removeClass('akismet_undo_link_removal').html(thisUrl);
+ // Show link. Core strips leading http://, so let's do that too.
+ $("#author_comment_url_"+ thisId).removeClass('akismet_undo_link_removal').text( thisUrl.replace( /^http:\/\/(www\.)?/ig, '' ) );
}
}
});