72 }); |
72 }); |
73 |
73 |
74 return false; |
74 return false; |
75 }); |
75 }); |
76 jQuery('a[id^="author_comment_url"]').mouseover(function () { |
76 jQuery('a[id^="author_comment_url"]').mouseover(function () { |
|
77 var wpcomProtocol = ( 'https:' === location.protocol ) ? 'https://' : 'http://'; |
77 // Need to determine size of author column |
78 // Need to determine size of author column |
78 var thisParentWidth = jQuery(this).parent().width(); |
79 var thisParentWidth = jQuery(this).parent().width(); |
79 // It changes based on if there is a gravatar present |
80 // It changes based on if there is a gravatar present |
80 thisParentWidth = (jQuery(this).parent().find('.grav-hijack').length) ? thisParentWidth - 42 + 'px' : thisParentWidth + 'px'; |
81 thisParentWidth = (jQuery(this).parent().find('.grav-hijack').length) ? thisParentWidth - 42 + 'px' : thisParentWidth + 'px'; |
81 if (jQuery(this).find('.mShot').length == 0 && !jQuery(this).hasClass('akismet_undo_link_removal')) { |
82 if (jQuery(this).find('.mShot').length == 0 && !jQuery(this).hasClass('akismet_undo_link_removal')) { |
82 var thisId = jQuery(this).attr('id').replace('author_comment_url_', ''); |
83 var thisId = jQuery(this).attr('id').replace('author_comment_url_', ''); |
83 jQuery('.widefat td').css('overflow', 'visible'); |
84 jQuery('.widefat td').css('overflow', 'visible'); |
84 jQuery(this).css('position', 'relative'); |
85 jQuery(this).css('position', 'relative'); |
85 var thisHref = jQuery.URLEncode(jQuery(this).attr('href')); |
86 var thisHref = jQuery.URLEncode(jQuery(this).attr('href')); |
86 jQuery(this).append('<div class="mShot mshot-container" style="left: '+thisParentWidth+'"><div class="mshot-arrow"></div><img src="http://s.wordpress.com/mshots/v1/'+thisHref+'?w=450" width="450" class="mshot-image_'+thisId+'" style="margin: 0;" /></div>'); |
87 jQuery(this).append('<div class="mShot mshot-container" style="left: '+thisParentWidth+'"><div class="mshot-arrow"></div><img src="'+wpcomProtocol+'s0.wordpress.com/mshots/v1/'+thisHref+'?w=450" width="450" class="mshot-image_'+thisId+'" style="margin: 0;" /></div>'); |
87 setTimeout(function () { |
88 setTimeout(function () { |
88 jQuery('.mshot-image_'+thisId).attr('src', 'http://s.wordpress.com/mshots/v1/'+thisHref+'?w=450&r=2'); |
89 jQuery('.mshot-image_'+thisId).attr('src', wpcomProtocol+'s0.wordpress.com/mshots/v1/'+thisHref+'?w=450&r=2'); |
89 }, 6000); |
90 }, 6000); |
90 setTimeout(function () { |
91 setTimeout(function () { |
91 jQuery('.mshot-image_'+thisId).attr('src', 'http://s.wordpress.com/mshots/v1/'+thisHref+'?w=450&r=3'); |
92 jQuery('.mshot-image_'+thisId).attr('src', wpcomProtocol+'s0.wordpress.com/mshots/v1/'+thisHref+'?w=450&r=3'); |
92 }, 12000); |
93 }, 12000); |
93 } else { |
94 } else { |
94 jQuery(this).find('.mShot').css('left', thisParentWidth).show(); |
95 jQuery(this).find('.mShot').css('left', thisParentWidth).show(); |
95 } |
96 } |
96 }).mouseout(function () { |
97 }).mouseout(function () { |
104 }else{if(c[x]==' ')o+='+';else{var d=c.charCodeAt(x);var h=d.toString(16); |
105 }else{if(c[x]==' ')o+='+';else{var d=c.charCodeAt(x);var h=d.toString(16); |
105 o+='%'+(h.length<2?'0':'')+h.toUpperCase();}x++;}}return o;} |
106 o+='%'+(h.length<2?'0':'')+h.toUpperCase();}x++;}}return o;} |
106 }); |
107 }); |
107 // Preload mshot images after everything else has loaded |
108 // Preload mshot images after everything else has loaded |
108 jQuery(window).load(function() { |
109 jQuery(window).load(function() { |
|
110 var wpcomProtocol = ( 'https:' === location.protocol ) ? 'https://' : 'http://'; |
109 jQuery('a[id^="author_comment_url"]').each(function () { |
111 jQuery('a[id^="author_comment_url"]').each(function () { |
110 jQuery.get('http://s.wordpress.com/mshots/v1/'+jQuery.URLEncode(jQuery(this).attr('href'))+'?w=450'); |
112 jQuery.get(wpcomProtocol+'s0.wordpress.com/mshots/v1/'+jQuery.URLEncode(jQuery(this).attr('href'))+'?w=450'); |
111 }); |
113 }); |
112 }); |
114 }); |