Skip to content

Instantly share code, notes, and snippets.

@Mononofu
Created March 15, 2012 18:59
Show Gist options
  • Select an option

  • Save Mononofu/2046055 to your computer and use it in GitHub Desktop.

Select an option

Save Mononofu/2046055 to your computer and use it in GitHub Desktop.

Revisions

  1. Mononofu revised this gist Mar 25, 2012. 1 changed file with 55 additions and 70 deletions.
    125 changes: 55 additions & 70 deletions share.html
    Original file line number Diff line number Diff line change
    @@ -1,32 +1,32 @@
    <div class="sharing">
    <ul class="social_share_privacy_area">
    <li class="facebook help_info">
    <span class="info" id="facebook-info">2 clicks for more privacy: The Google+ button will only load after you click here, so no data will be sent unless you actively allow it.</span>
    <span class="info" id="facebook-info">2 clicks for more privacy: The Facebook button will only load after you click here, so no data will be sent unless you actively allow it.</span>
    <span class="switch off"
    id="fb-switch"
    onclick="toggle_fb();">not connected to Facebook</span>
    onclick="toggle('fb');">not connected to Facebook</span>
    <div class="fb_like dummy_btn" id="fb-like"
    onmouseover="if(!fb_on) document.getElementById('facebook-info').style.display='block';"
    onmouseover="if(!networks['fb']['on']) document.getElementById('facebook-info').style.display='block';"
    onmouseout="document.getElementById('facebook-info').style.display='none';">
    </div>
    </li>
    <li class="twitter help_info">
    <span class="info" id="tweet-info">2 clicks for more privacy: The Google+ button will only load after you click here, so no data will be sent unless you actively allow it.</span>
    <span class="info" id="tweet-info">2 clicks for more privacy: The Twitter button will only load after you click here, so no data will be sent unless you actively allow it.</span>
    <span class="switch off"
    id="tw-switch"
    onclick="toggle_tw();">not connected to Twitter</span>
    onclick="toggle('tw');">not connected to Twitter</span>
    <div class="tweet dummy_btn" id="tw-like"
    onmouseover="if(!tw_on) document.getElementById('tweet-info').style.display='block';"
    onmouseover="if(!networks['tw']['on']) document.getElementById('tweet-info').style.display='block';"
    onmouseout="document.getElementById('tweet-info').style.display='none';">
    </div>
    </li>
    <li class="gplus help_info">
    <span class="info" id="gplus-info">2 clicks for more privacy: The Google+ button will only load after you click here, so no data will be sent unless you actively allow it.</span>
    <span class="switch off"
    id="gp-switch"
    onclick="toggle_gp();">not connected to Google+</span>
    onclick="toggle('gp');">not connected to Google+</span>
    <div class="gplusone dummy_btn" id="gp-like"
    onmouseover="if(!gp_on) document.getElementById('gplus-info').style.display='block';"
    onmouseover="if(!networks['gp']['on']) document.getElementById('gplus-info').style.display='block';"
    onmouseout="document.getElementById('gplus-info').style.display='none';">
    </div>
    </li>
    @@ -35,9 +35,9 @@
    <span class="info" id="reddit-info">2 clicks for more privacy: The Reddit button will only load after you click here, so no data will be sent unless you actively allow it.</span>
    <span class="switch off"
    id="rd-switch"
    onclick="toggle_rd();">not connected to Reddit</span>
    onclick="toggle('rd');">not connected to Reddit</span>
    <div class="reddit dummy_btn" id="rd-like"
    onmouseover="if(!rd_on) document.getElementById('reddit-info').style.display='block';"
    onmouseover="if(!networks['rd']['on']) document.getElementById('reddit-info').style.display='block';"
    onmouseout="document.getElementById('reddit-info').style.display='none';"
    width="130px">
    </div>
    @@ -47,9 +47,9 @@
    <span class="info" id="hackernews-info">2 clicks for more privacy: The HackerNews button will only load after you click here, so no data will be sent unless you actively allow it.</span>
    <span class="switch off"
    id="hn-switch"
    onclick="toggle_hn();">not connected to HackerNews</span>
    onclick="toggle('hn');">not connected to HackerNews</span>
    <div class="hackernews dummy_btn" id="hn-like"
    onmouseover="if(!hn_on) document.getElementById('hackernews-info').style.display='block';"
    onmouseover="if(!networks['hn']['on']) document.getElementById('hackernews-info').style.display='block';"
    onmouseout="document.getElementById('hackernews-info').style.display='none';">
    </div>
    </li>
    @@ -58,71 +58,56 @@
    </div>

    <script>
    var fb_on = true, tw_on = true, gp_on = true, rd_on = true, hn_on = true;

    /* setup at load */
    toggle_fb(); toggle_tw(); toggle_gp(); toggle_rd(); toggle_hn();

    function toggle_fb() {
    if(fb_on) {
    document.getElementById('fb-switch').setAttribute('class', 'switch off');
    document.getElementById('fb-like').innerHTML = '<img src="{{ root_url }}/images/dummy_facebook.png" alt="Facebook &quot;Like&quot;-Dummy" class="fb_like_privacy_dummy" onclick="toggle_fb();">';
    }
    else {
    document.getElementById('fb-switch').setAttribute('class', 'switch on');
    document.getElementById('fb-like').innerHTML = '<iframe src="http://www.facebook.com/plugins/like.php?locale=en_US&amp;href={{ site.url | urlencode }}{{ page.url | urlencode }}&amp;send=false&amp;layout=button_count&amp;width=120&amp;show_faces=false&amp;action=recommend&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:145px; height:21px;" allowtransparency="true"></iframe>';
    }
    fb_on = !fb_on;
    }

    function toggle_tw() {
    if(tw_on) {
    document.getElementById('tw-switch').setAttribute('class', 'switch off');
    document.getElementById('tw-like').innerHTML = '<img src="{{ root_url }}/images/dummy_twitter.png" alt="&quot;Tweet this&quot;-Dummy" class="tweet_this_dummy" onclick="toggle_tw();">';
    }
    else {
    document.getElementById('tw-switch').setAttribute('class', 'switch on');
    document.getElementById('tw-like').innerHTML = '<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?url={{ site.url | urlencode }}{{ page.url | urlencode }}&amp;counturl={{ site.url | urlencode }}{{ page.url | urlencode }}&amp;text={{ page.title | urlencode }}&amp;count=horizontal&amp;lang=en" style="width:130px; height:25px;"></iframe>';
    }
    tw_on = !tw_on;
    }

    function toggle_gp() {
    if(gp_on) {
    document.getElementById('gp-switch').setAttribute('class', 'switch off');
    document.getElementById('gp-like').innerHTML = '<img src="{{ root_url }}/images/dummy_gplus.png" alt="&quot;Google+1&quot;-Dummy" class="gplus_one_dummy" onclick="toggle_gp();">';
    }
    else {
    document.getElementById('gp-switch').setAttribute('class', 'switch on');
    document.getElementById('gp-like').innerHTML = '<div id="___plusone_0" style="height: 20px; width: 90px; display: inline-block; text-indent: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; float: none; line-height: normal; font-size: 1px; vertical-align: baseline; background-position: initial initial; background-repeat: initial initial; "><iframe allowtransparency="true" frameborder="0" hspace="0" id="I1_1331815463594" marginheight="0" marginwidth="0" name="I1_1331815463594" scrolling="no" src="https://plusone.google.com/_/+1/fastbutton?url={{ site.url | urlencode }}{{ page.url | urlencode }}&amp;size=medium&amp;count=true&amp;hl=de&amp;jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3D-ZAiwCF-rcM.en_GB.%2Fsv%3D1%2Fam%3D!Fpfk5B9U9k6IcXVdRg%2Fd%3D1#id=I1_1331815463594&amp;parent=http%3A%2F%2Fwww.furidamu.org&amp;rpctoken=363101237&amp;_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart" style="width: 90px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; height: 20px; position: static; left: 0px; top: 0px; visibility: visible; " tabindex="0" vspace="0" width="100%" title="+1"></iframe></div>';
    }
    gp_on = !gp_on;
    }

    function toggle_rd() {
    if(rd_on) {
    document.getElementById('rd-switch').setAttribute('class', 'switch off');
    document.getElementById('rd-like').innerHTML = '<img src="{{ root_url }}/images/dummy_reddit.png" alt="&quot;Reddit&quot;-Dummy" class="reddit_dummy" onclick="toggle_rd();">';
    }
    else {
    document.getElementById('rd-switch').setAttribute('class', 'switch on');
    document.getElementById('rd-like').innerHTML = '<iframe src="http://www.reddit.com/static/button/button1.html?width=50&amp;url={{ site.url | urlencode }}{{ page.url | urlencode }}" height="22" width="120" scrolling="no" frameborder="0" id="rd-frame"></iframe>';
    document.getElementById('rd-frame').setAttribute('width', '120px');
    var networks = {
    "fb": {
    "name": "Facebook",
    "on": true,
    "btn-html": '<iframe src="http://www.facebook.com/plugins/like.php?locale=en_US&amp;href={{ site.url | urlencode }}{{ page.url | urlencode }}&amp;send=false&amp;layout=button_count&amp;width=120&amp;show_faces=false&amp;action=recommend&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:145px; height:21px;" allowtransparency="true"></iframe>',
    "img-html": '<img src="{{ root_url }}/images/dummy_facebook.png" alt="Facebook &quot;Like&quot;-Dummy" class="fb_like_privacy_dummy" onclick="toggle(\'fb\');">'
    },
    "tw": {
    "name": "Twitter",
    "on": true,
    "btn-html": '<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?url={{ site.url | urlencode }}{{ page.url | urlencode }}&amp;counturl={{ site.url | urlencode }}{{ page.url | urlencode }}&amp;text={{ page.title | urlencode }}&amp;count=horizontal&amp;lang=en" style="width:130px; height:25px;"></iframe>',
    "img-html": '<img src="{{ root_url }}/images/dummy_twitter.png" alt="&quot;Tweet this&quot;-Dummy" class="tweet_this_dummy" onclick="toggle(\'tw\');">'
    },
    "gp": {
    "name": "Google+",
    "on": true,
    "btn-html": '<div id="___plusone_0" style="height: 20px; width: 90px; display: inline-block; text-indent: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; float: none; line-height: normal; font-size: 1px; vertical-align: baseline; background-position: initial initial; background-repeat: initial initial; "><iframe allowtransparency="true" frameborder="0" hspace="0" id="I1_1331815463594" marginheight="0" marginwidth="0" name="I1_1331815463594" scrolling="no" src="https://plusone.google.com/_/+1/fastbutton?url={{ site.url | urlencode }}{{ page.url | urlencode }}&amp;size=medium&amp;count=true&amp;hl=de&amp;jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3D-ZAiwCF-rcM.en_GB.%2Fsv%3D1%2Fam%3D!Fpfk5B9U9k6IcXVdRg%2Fd%3D1#id=I1_1331815463594&amp;parent=http%3A%2F%2Fwww.furidamu.org&amp;rpctoken=363101237&amp;_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart" style="width: 90px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; height: 20px; position: static; left: 0px; top: 0px; visibility: visible; " tabindex="0" vspace="0" width="100%" title="+1"></iframe></div>',
    "img-html": '<img src="{{ root_url }}/images/dummy_gplus.png" alt="&quot;Google+1&quot;-Dummy" class="gplus_one_dummy" onclick="toggle(\'gp\');">'
    },
    "rd": {
    "name": "Reddit",
    "on": true,
    "btn-html": '<iframe src="http://www.reddit.com/static/button/button1.html?width=50&amp;url={{ site.url | urlencode }}{{ page.url | urlencode }}" height="22" width="120" scrolling="no" frameborder="0" id="rd-frame"></iframe>',
    "img-html": '<img src="{{ root_url }}/images/dummy_reddit.png" alt="&quot;Reddit&quot;-Dummy" class="reddit_dummy" onclick="toggle(\'rd\');">'
    },
    "hn": {
    "name": "HackerNews",
    "on": true,
    "btn-html": '<iframe frameborder="no" scrolling="no" height="40px" width="120px" src="http://hnlike.com/upvote.php?link={{ site.url | urlencode }}{{ page.url | urlencode }}&title={{ page.title | urlencode }}">iframes not supported by your browser</iframe>',
    "img-html": '<img src="{{ root_url }}/images/dummy_hackernews.png" alt="&quot;Reddit&quot;-Dummy" class="reddit_dummy" onclick="toggle(\'hn\');" style="box-shadow:none;">'
    }
    rd_on = !rd_on;
    };

    for(var id in networks) {
    toggle(id);
    }

    function toggle_hn() {
    if(hn_on) {
    document.getElementById('hn-switch').setAttribute('class', 'switch off');
    document.getElementById('hn-like').innerHTML = '<img src="{{ root_url }}/images/dummy_hackernews.png" alt="&quot;Reddit&quot;-Dummy" class="reddit_dummy" onclick="toggle_hn();" style="box-shadow:none;">';
    function toggle(id) {
    if(networks[id]["on"]) {
    document.getElementById(id + '-switch').setAttribute('class', 'switch off');
    document.getElementById(id + "-like").innerHTML = networks[id]["img-html"];
    }
    else {
    document.getElementById('hn-switch').setAttribute('class', 'switch on');
    document.getElementById('hn-like').innerHTML = '<iframe frameborder="no" scrolling="no" height="40px" width="120px" src="http://hnlike.com/upvote.php?link={{ site.url | urlencode }}{{ page.url | urlencode }}&title={{ page.title | urlencode }}">iframes not supported by your browser</iframe>';
    document.getElementById(id + '-switch').setAttribute('class', 'switch on');
    document.getElementById(id + "-like").innerHTML = networks[id]["btn-html"];
    if(id == "rd") {
    document.getElementById('rd-frame').setAttribute('width', '120px');
    }
    }
    hn_on = !hn_on;
    networks[id]["on"] = !networks[id]["on"];
    }

    </script>
  2. Mononofu revised this gist Mar 15, 2012. 1 changed file with 3 additions and 10 deletions.
    13 changes: 3 additions & 10 deletions share.html
    Original file line number Diff line number Diff line change
    @@ -58,17 +58,10 @@
    </div>

    <script>
    var fb_on = true;
    var tw_on = true;
    var gp_on = true;
    var rd_on = true;
    var hn_on = true;
    var fb_on = true, tw_on = true, gp_on = true, rd_on = true, hn_on = true;

    toggle_fb();
    toggle_tw();
    toggle_gp();
    toggle_rd();
    toggle_hn();
    /* setup at load */
    toggle_fb(); toggle_tw(); toggle_gp(); toggle_rd(); toggle_hn();

    function toggle_fb() {
    if(fb_on) {
  3. Mononofu revised this gist Mar 15, 2012. 1 changed file with 132 additions and 0 deletions.
    132 changes: 132 additions & 0 deletions share.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,132 @@
    .social_share_privacy_area {
    clear: both;
    margin: 20px 0 !important;
    list-style-type: none;
    padding: 0 !important;
    width: auto;
    height: 25px;
    display: block;
    }
    .social_share_privacy_area li {
    margin: 0 !important;
    padding: 0 !important;
    height: 21px;
    float: left;
    }
    .social_share_privacy_area li .dummy_btn {
    float: left;
    margin: 0 0 0 10px;
    cursor: pointer;
    padding: 0;
    height: inherit;
    }

    /* Facebook begin */
    .social_share_privacy_area .facebook {
    width: 180px;
    display: inline-block;
    }
    .social_share_privacy_area .facebook .fb_like iframe {
    width: 145px;
    }
    /* Facebook end */
    /* Twitter begin */
    .social_share_privacy_area .twitter {
    width: 148px;
    }
    .social_share_privacy_area li div.tweet {
    width: 115px;
    }
    /* Twitter end */
    /* Google+ begin */
    .social_share_privacy_area .gplus {
    width: 123px;
    }
    .social_share_privacy_area li div.gplusone {
    width: 90px;
    }
    /* Google+ end */
    /* Reddit begin */
    .social_share_privacy_area .reddit {
    width: 183px;
    }
    .social_share_privacy_area li div.reddit {
    width: 150px;
    }
    /* Reddit end */
    /* HN begin */
    .social_share_privacy_area .hackernews {
    width: 133px;
    }
    .social_share_privacy_area li div.hackernews {
    width: 100px;
    }
    .social_share_privacy_area li div.hackernews iframe {
    position: relative;
    top: -8px;
    left: -7px;
    }
    /* HN end */

    /* Switch begin */
    .social_share_privacy_area li .switch {
    display: inline-block;
    text-indent: -9999em;
    background: transparent url(/images/socialshareprivacy_on_off.png) no-repeat 0 0 scroll;
    width: 23px;
    height: 12px;
    overflow: hidden;
    float: left;
    margin: 4px 0 0;
    padding: 0;
    cursor: pointer;
    }
    .social_share_privacy_area li .switch.on {
    background-position: 0 -12px;
    }
    /* Switch end */
    /* Tooltips begin */
    .social_share_privacy_area li.help_info {
    position: relative;
    }
    .social_share_privacy_area li.help_info .info,
    .social_share_privacy_area li .help_info.icon .info {
    display: none;
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 290px;
    padding: 10px 15px;
    margin: 0;
    font-size: 12px;
    line-height: 16px;
    font-weight: bold;
    border: 1px solid #ccc;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    -moz-box-shadow: 0 3px 4px #999;
    -webkit-box-shadow: 0 3px 4px #999;
    box-shadow: 0 3px 4px #999;
    background-color: #fdfbec;
    color: #000;
    z-index: 500;
    }
    .social_share_privacy_area li.gplus.help_info .info {
    left: -60px;
    }
    .social_share_privacy_area li .help_info.icon .info {
    left: -243px;
    width: 350px;
    }
    .social_share_privacy_area li.help_info.display .info,
    .social_share_privacy_area li .help_info.icon.display .info {
    display: block;
    }
    .social_share_privacy_area li.help_info.info_off.display .info {
    display: none;
    }
    .social_share_privacy_area li.help_info div img {
    border-width: 0;
    }
    /* Tooltips end */
  4. Mononofu renamed this gist Mar 15, 2012. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. Mononofu created this gist Mar 15, 2012.
    135 changes: 135 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,135 @@
    <div class="sharing">
    <ul class="social_share_privacy_area">
    <li class="facebook help_info">
    <span class="info" id="facebook-info">2 clicks for more privacy: The Google+ button will only load after you click here, so no data will be sent unless you actively allow it.</span>
    <span class="switch off"
    id="fb-switch"
    onclick="toggle_fb();">not connected to Facebook</span>
    <div class="fb_like dummy_btn" id="fb-like"
    onmouseover="if(!fb_on) document.getElementById('facebook-info').style.display='block';"
    onmouseout="document.getElementById('facebook-info').style.display='none';">
    </div>
    </li>
    <li class="twitter help_info">
    <span class="info" id="tweet-info">2 clicks for more privacy: The Google+ button will only load after you click here, so no data will be sent unless you actively allow it.</span>
    <span class="switch off"
    id="tw-switch"
    onclick="toggle_tw();">not connected to Twitter</span>
    <div class="tweet dummy_btn" id="tw-like"
    onmouseover="if(!tw_on) document.getElementById('tweet-info').style.display='block';"
    onmouseout="document.getElementById('tweet-info').style.display='none';">
    </div>
    </li>
    <li class="gplus help_info">
    <span class="info" id="gplus-info">2 clicks for more privacy: The Google+ button will only load after you click here, so no data will be sent unless you actively allow it.</span>
    <span class="switch off"
    id="gp-switch"
    onclick="toggle_gp();">not connected to Google+</span>
    <div class="gplusone dummy_btn" id="gp-like"
    onmouseover="if(!gp_on) document.getElementById('gplus-info').style.display='block';"
    onmouseout="document.getElementById('gplus-info').style.display='none';">
    </div>
    </li>

    <li class="reddit help_info">
    <span class="info" id="reddit-info">2 clicks for more privacy: The Reddit button will only load after you click here, so no data will be sent unless you actively allow it.</span>
    <span class="switch off"
    id="rd-switch"
    onclick="toggle_rd();">not connected to Reddit</span>
    <div class="reddit dummy_btn" id="rd-like"
    onmouseover="if(!rd_on) document.getElementById('reddit-info').style.display='block';"
    onmouseout="document.getElementById('reddit-info').style.display='none';"
    width="130px">
    </div>
    </li>

    <li class="hackernews help_info">
    <span class="info" id="hackernews-info">2 clicks for more privacy: The HackerNews button will only load after you click here, so no data will be sent unless you actively allow it.</span>
    <span class="switch off"
    id="hn-switch"
    onclick="toggle_hn();">not connected to HackerNews</span>
    <div class="hackernews dummy_btn" id="hn-like"
    onmouseover="if(!hn_on) document.getElementById('hackernews-info').style.display='block';"
    onmouseout="document.getElementById('hackernews-info').style.display='none';">
    </div>
    </li>

    </ul>
    </div>

    <script>
    var fb_on = true;
    var tw_on = true;
    var gp_on = true;
    var rd_on = true;
    var hn_on = true;

    toggle_fb();
    toggle_tw();
    toggle_gp();
    toggle_rd();
    toggle_hn();

    function toggle_fb() {
    if(fb_on) {
    document.getElementById('fb-switch').setAttribute('class', 'switch off');
    document.getElementById('fb-like').innerHTML = '<img src="{{ root_url }}/images/dummy_facebook.png" alt="Facebook &quot;Like&quot;-Dummy" class="fb_like_privacy_dummy" onclick="toggle_fb();">';
    }
    else {
    document.getElementById('fb-switch').setAttribute('class', 'switch on');
    document.getElementById('fb-like').innerHTML = '<iframe src="http://www.facebook.com/plugins/like.php?locale=en_US&amp;href={{ site.url | urlencode }}{{ page.url | urlencode }}&amp;send=false&amp;layout=button_count&amp;width=120&amp;show_faces=false&amp;action=recommend&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:145px; height:21px;" allowtransparency="true"></iframe>';
    }
    fb_on = !fb_on;
    }

    function toggle_tw() {
    if(tw_on) {
    document.getElementById('tw-switch').setAttribute('class', 'switch off');
    document.getElementById('tw-like').innerHTML = '<img src="{{ root_url }}/images/dummy_twitter.png" alt="&quot;Tweet this&quot;-Dummy" class="tweet_this_dummy" onclick="toggle_tw();">';
    }
    else {
    document.getElementById('tw-switch').setAttribute('class', 'switch on');
    document.getElementById('tw-like').innerHTML = '<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?url={{ site.url | urlencode }}{{ page.url | urlencode }}&amp;counturl={{ site.url | urlencode }}{{ page.url | urlencode }}&amp;text={{ page.title | urlencode }}&amp;count=horizontal&amp;lang=en" style="width:130px; height:25px;"></iframe>';
    }
    tw_on = !tw_on;
    }

    function toggle_gp() {
    if(gp_on) {
    document.getElementById('gp-switch').setAttribute('class', 'switch off');
    document.getElementById('gp-like').innerHTML = '<img src="{{ root_url }}/images/dummy_gplus.png" alt="&quot;Google+1&quot;-Dummy" class="gplus_one_dummy" onclick="toggle_gp();">';
    }
    else {
    document.getElementById('gp-switch').setAttribute('class', 'switch on');
    document.getElementById('gp-like').innerHTML = '<div id="___plusone_0" style="height: 20px; width: 90px; display: inline-block; text-indent: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; float: none; line-height: normal; font-size: 1px; vertical-align: baseline; background-position: initial initial; background-repeat: initial initial; "><iframe allowtransparency="true" frameborder="0" hspace="0" id="I1_1331815463594" marginheight="0" marginwidth="0" name="I1_1331815463594" scrolling="no" src="https://plusone.google.com/_/+1/fastbutton?url={{ site.url | urlencode }}{{ page.url | urlencode }}&amp;size=medium&amp;count=true&amp;hl=de&amp;jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3D-ZAiwCF-rcM.en_GB.%2Fsv%3D1%2Fam%3D!Fpfk5B9U9k6IcXVdRg%2Fd%3D1#id=I1_1331815463594&amp;parent=http%3A%2F%2Fwww.furidamu.org&amp;rpctoken=363101237&amp;_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart" style="width: 90px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; height: 20px; position: static; left: 0px; top: 0px; visibility: visible; " tabindex="0" vspace="0" width="100%" title="+1"></iframe></div>';
    }
    gp_on = !gp_on;
    }

    function toggle_rd() {
    if(rd_on) {
    document.getElementById('rd-switch').setAttribute('class', 'switch off');
    document.getElementById('rd-like').innerHTML = '<img src="{{ root_url }}/images/dummy_reddit.png" alt="&quot;Reddit&quot;-Dummy" class="reddit_dummy" onclick="toggle_rd();">';
    }
    else {
    document.getElementById('rd-switch').setAttribute('class', 'switch on');
    document.getElementById('rd-like').innerHTML = '<iframe src="http://www.reddit.com/static/button/button1.html?width=50&amp;url={{ site.url | urlencode }}{{ page.url | urlencode }}" height="22" width="120" scrolling="no" frameborder="0" id="rd-frame"></iframe>';
    document.getElementById('rd-frame').setAttribute('width', '120px');
    }
    rd_on = !rd_on;

    }

    function toggle_hn() {
    if(hn_on) {
    document.getElementById('hn-switch').setAttribute('class', 'switch off');
    document.getElementById('hn-like').innerHTML = '<img src="{{ root_url }}/images/dummy_hackernews.png" alt="&quot;Reddit&quot;-Dummy" class="reddit_dummy" onclick="toggle_hn();" style="box-shadow:none;">';
    }
    else {
    document.getElementById('hn-switch').setAttribute('class', 'switch on');
    document.getElementById('hn-like').innerHTML = '<iframe frameborder="no" scrolling="no" height="40px" width="120px" src="http://hnlike.com/upvote.php?link={{ site.url | urlencode }}{{ page.url | urlencode }}&title={{ page.title | urlencode }}">iframes not supported by your browser</iframe>';
    }
    hn_on = !hn_on;
    }

    </script>