X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/8f374b7233bc2815ccc387e448d208c5434eb961..refs/tags/wordpress-3.6.1-scripts:/wp-content/plugins/akismet/akismet.js diff --git a/wp-content/plugins/akismet/akismet.js b/wp-content/plugins/akismet/akismet.js index 839fe6bc..f3da8fd6 100644 --- a/wp-content/plugins/akismet/akismet.js +++ b/wp-content/plugins/akismet/akismet.js @@ -1,4 +1,16 @@ jQuery(document).ready(function () { + jQuery( '.switch-have-key' ).click( function() { + var no_key = jQuery( this ).parents().find('div.no-key'); + var have_key = jQuery( this ).parents().find('div.have-key'); + + no_key.addClass( 'hidden' ); + have_key.removeClass( 'hidden' ); + + return false; + }); + jQuery( 'p.need-key a' ).click( function(){ + document.akismet_activate.submit(); + }); jQuery('.akismet-status').each(function () { var thisId = jQuery(this).attr('commentid'); jQuery(this).prependTo('#comment-' + thisId + ' .column-comment div:first-child'); @@ -74,6 +86,7 @@ jQuery(document).ready(function () { return false; }); jQuery('a[id^="author_comment_url"]').mouseover(function () { + var wpcomProtocol = ( 'https:' === location.protocol ) ? 'https://' : 'http://'; // Need to determine size of author column var thisParentWidth = jQuery(this).parent().width(); // It changes based on if there is a gravatar present @@ -83,12 +96,12 @@ jQuery(document).ready(function () { jQuery('.widefat td').css('overflow', 'visible'); jQuery(this).css('position', 'relative'); var thisHref = jQuery.URLEncode(jQuery(this).attr('href')); - jQuery(this).append('
'); + jQuery(this).append('
'); setTimeout(function () { - jQuery('.mshot-image_'+thisId).attr('src', 'http://s.wordpress.com/mshots/v1/'+thisHref+'?w=450&r=2'); + jQuery('.mshot-image_'+thisId).attr('src', wpcomProtocol+'s0.wordpress.com/mshots/v1/'+thisHref+'?w=450&r=2'); }, 6000); setTimeout(function () { - jQuery('.mshot-image_'+thisId).attr('src', 'http://s.wordpress.com/mshots/v1/'+thisHref+'?w=450&r=3'); + jQuery('.mshot-image_'+thisId).attr('src', wpcomProtocol+'s0.wordpress.com/mshots/v1/'+thisHref+'?w=450&r=3'); }, 12000); } else { jQuery(this).find('.mShot').css('left', thisParentWidth).show(); @@ -106,7 +119,8 @@ jQuery.extend({URLEncode:function(c){var o='';var x=0;c=c.toString();var r=/(^[a }); // Preload mshot images after everything else has loaded jQuery(window).load(function() { + var wpcomProtocol = ( 'https:' === location.protocol ) ? 'https://' : 'http://'; jQuery('a[id^="author_comment_url"]').each(function () { - jQuery.get('http://s.wordpress.com/mshots/v1/'+jQuery.URLEncode(jQuery(this).attr('href'))+'?w=450'); + jQuery.get(wpcomProtocol+'s0.wordpress.com/mshots/v1/'+jQuery.URLEncode(jQuery(this).attr('href'))+'?w=450'); }); -}); \ No newline at end of file +});