Last active
April 26, 2016 12:09
-
-
Save bhagman/3d799b1a4aa70aa5eede to your computer and use it in GitHub Desktop.
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
<Module> | |
<ModulePrefs title="Google+ Badge" directory_title="Google+ Badge" title_url="https://code.google.com/p/google-sites-badge-gadget/" description="Add a Google+ badge on your Google Sites pages." screenshot="http://lh3.googleusercontent.com/-OrI1DUdm480/T7y_kOxudFI/AAAAAAAAEgE/rp20hOY3H7c/s800/google-plus-share-button-screenshot.png" thumbnail="http://lh3.googleusercontent.com/-EsINHttHlaw/T7y_kMuuoRI/AAAAAAAAEgA/MxC8OZeUebc/s800/google-plus-share-button-thumbnail.png" width="100%" height="185" scrolling="true" author="BrettJ" author_email="[email protected]" author_affiliation="Google"></ModulePrefs> | |
<UserPref name="url" display_name="Google+ Profile URL or Google+ Page URL, copy from your profile, which will look like either: https://plus.google.com/123456789/ or https://plus.google.com/+LarryPage/" required="true"/> | |
<UserPref name="width" display_name="Badge width" default_value="300"/> | |
<UserPref name="layout" display_name="Layout" datatype="enum" default_value="landscape"> | |
<EnumValue value="portrait" display_value="Portrait"/> | |
<EnumValue value="landscape" display_value="Landscape"/> | |
</UserPref> | |
<UserPref name="theme" display_name="Badge theme" default_value="light" datatype="enum"> | |
<EnumValue value="light" display_value="Light"/> | |
<EnumValue value="dark" display_value="Dark"/> | |
</UserPref> | |
<Content type="html"> | |
<![CDATA[ | |
<style type="text/css"> body {background:transparent; margin: 0; padding: 0;} </style> | |
<div id="container"></div> | |
<script type="text/javascript"> (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); </script> <script type="text/javascript"> var prefs = new gadgets.Prefs(); var profileUrl = prefs.getString("url"); var badgeHeight = prefs.getString("height"); var badgeLayout = prefs.getString("layout"); var badgeTheme = prefs.getString("theme"); var container = document.getElementById('container'); badge = '<div class="g-person" data-href="' + profileUrl + '" data-theme="' + badgeTheme + '" data-width="' + badgeWidth + '" data-layout="' + badgeLayout + '"><\/div>'; document.getElementById('container').innerHTML = badge; </script> | |
]]> | |
</Content> | |
</Module> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment