Styling jetpack sharing google plus button

Nothing profound.

I use jetpack so I wanted to use the provided sharedaddy module.

The google plus button is a new addition and displays the medium button with default annotation.

I don’t have the traffic to display annotations. I want to use the small button.

So per google’s docs, I edited the sharing-sources.php file

from

[crayon lang=”php”]
public function get_display( $post ) {
return ‘

function removeCountsFromGooglePlus() { if (jQuery('.googleplus1_button iframe')) { jQuery('.googleplus1_button iframe').attr("src", jQuery('.googleplus1_button iframe').attr("src").replace(/size=/,"annotation=none&size=")); } }

Note: (9/2012) Google updated their api to change from count=false to annotation=none. Snipped above updated to reflect this…

jQuery(‘.googleplus1_button iframe’).attr(“src”, jQuery(‘.googleplus1_button iframe’).attr(“src”).replace(/count=true/,”count=false”));