~canonical-sysadmins/wordpress/4.1.3

« back to all changes in this revision

Viewing changes to wp-content/plugins/akismet/_inc/akismet.js

  • Committer: Nick Moffitt
  • Date: 2015-01-15 11:05:37 UTC
  • mfrom: (1.1.1 wp4-upstream)
  • Revision ID: nick.moffitt@canonical.com-20150115110537-8bp1y42eyg0jsa7c
Tags: 4.1
MergeĀ upstreamĀ versionĀ 4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
                var thisId = $(this).attr('commentid');
19
19
                $(this).insertAfter('#comment-' + thisId + ' .author strong:first').show();
20
20
        });
21
 
        $('#the-comment-list').find('tr.comment, tr[id ^= "comment-"]').find('.column-author a[title ^= "http://"]').each(function () {
 
21
        $('#the-comment-list').find('tr.comment, tr[id ^= "comment-"]').find('.column-author a[title ^= "http://"], .column-author a[title ^= "https://"]').each(function () {
22
22
                var thisTitle = $(this).attr('title');
23
23
                        thisCommentId = $(this).parents('tr:first').attr('id').split("-");
24
24
 
72
72
        });
73
73
        $('.akismet_undo_link_removal').live('click', function () {
74
74
                var thisId = $(this).attr('cid');
75
 
                var thisUrl = $(this).attr('href').replace("http://www.", "").replace("http://", "");
 
75
                var thisUrl = $(this).attr('href');
76
76
                var data = {
77
77
                        action: 'comment_author_reurl',
78
78
                        _wpnonce: WPAkismet.comment_author_url_nonce,
91
91
                                if (response) {
92
92
                                        // Add "x" link
93
93
                                        $("a[commentid='"+ thisId +"']").show();
94
 
                                        // Show link
95
 
                                        $("#author_comment_url_"+ thisId).removeClass('akismet_undo_link_removal').html(thisUrl);
 
94
                                        // Show link. Core strips leading http://, so let's do that too.
 
95
                                        $("#author_comment_url_"+ thisId).removeClass('akismet_undo_link_removal').text( thisUrl.replace( /^http:\/\/(www\.)?/ig, '' ) );
96
96
                                }
97
97
                        }
98
98
                });