Last active
August 13, 2016 14:54
-
-
Save echenley/bb7be9e8c5b352e61b3d to your computer and use it in GitHub Desktop.
Responsive Google Plus Widget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="gp-wrap" id="gp-wrap"> | |
<div class="g-page" data-href="https://plus.google.com/102226233421872956936" data-rel="publisher"></div> | |
<script type="text/javascript"> | |
(function() { | |
// this guy right here | |
document.getElementsByClassName('g-page')[0].setAttribute('data-width', document.getElementById('gp-wrap').clientWidth); | |
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); | |
})(); | |
</script> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment