Creato da pastuweb.com
Share My Page
My Social Accounts
Account FaceBook Account LinkedIn Account Twitter Account Google Plus Account Git Hub

First of all, in Chrome Extension:

Inline Code Considered Harmful
Does not accept inline JavaScript code. So you have to create their own JS and then import them in popup.html. So you have to do a rewrite of the code. 
Take a look at this link for more information on inline rewrite:
http://www.html5rocks.com/en/tutorials/security/content-security-policy/
 
manifest.json
  "permissions": ["tabs",  "http://*.twitter.com/*", "http://*.twing.com/*", "https://apis.google.com/*"],
  "content_security_policy": "script-src 'self'
https://platform.twitter.com
https://cdn.api.twitter.com
https://syndication.twimg.com
https://apis.google.com; object-src 'self'",
 
Must be all on ONE LINE contained the key "content_security_policy"
 
popup.html
 
<script type="text/javascript" src="popup.js"></script>
<script type="text/javascript" src="twitter.js"></script>
<script type="text/javascript" src="googleplus.js"></script>
 
and where you want it, insert:
 
<a href="https://twitter.com/share" data-text="My personal Text"
class="twitter-share-button" data-url="http://appuntivari.net" data-via="pasturenzi">Tweet</a>
 
<div class="g-plusone" data-annotation="inline" data-size="medium" data-width="300" data-href="http://appuntivari.net"></div>
 
popup.js
 
rewrites = [
 [/chrome-extension:\/\/([a-z]+)\.twitter\.com/, 'https://$1.twitter.com'],
 [/chrome-extension:\/\/([a-z]+)\.twimg\.com/, 'https://$1.twimg.com']
];
 
document.addEventListener('beforeload', function(e){
 for (var i = 0, rule; rule = rewrites[i]; i++) {
if (rule[0].test(e.url)) {
 e.preventDefault();
 e.stopPropagation();
 e.srcElement.src = e.srcElement.src.replace(rule[0], rule[1]);
 break;
}
 }
}, true);
 
twitter.js
 
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id))
{js=d.createElement(s);js.id=id;
js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);
}}(document, 'script', 'twitter-wjs');
 
googleplus.js
 
  window.___gcfg = {lang: 'it'};
 
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/platform.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
 
 
If you create these buttons in AJAX, you have to reload the widgets
//loading widgets Twitter in AJAX
$.getScript('https://platform.twitter.com/widgets.js', function(){
twttr.widgets.load();
});
//loading widgets Google in AJAX
gapi.plusone.go();
 
 
That's it.