Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added open graph tags

  • Loading branch information...
commit d4fd49a26ae19c34942bf631010cb4dd09edfb59 1 parent 18640b5
@tallowen tallowen authored
Showing with 11 additions and 5 deletions.
  1. +5 −1 large.html
  2. +1 −1  media/socialshare.min.js
  3. +5 −3 small.html
View
6 large.html
@@ -2,7 +2,11 @@
<html>
<head>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta property="og:title" content="Introducing Collusion - mozilla.org">
+ <meta property="og:site_name" content="Mozilla">
+ <meta property="og:image" content="http://mozcom-cdn.mozilla.net/img/firefox-100.jpg">
+ <meta property="og:url" content="https://www.mozilla.org">
<title>Social Share</title>
<link rel="stylesheet/less" href="demo/demo.less" type="text/css">
View
2  media/socialshare.min.js
@@ -1 +1 @@
-(function(c){var f='[data-toggle="dropdown"]';var k=".socialshare";var e='.socialshare.open[data-type="small-bubbles"] .share-options div.fb-like iframe';var a;var g='<div class="dropdown-toggle" data-toggle="dropdown"> <div class="share-link"><div> <div class="heart"></div> <p class="text">Share This</p> <div class="caret"><div></div></div></div> </div><div class="clear"></div><div class="share-options"> <ul> <li><div class="fb-like"></div></li> <li><div class="g-plusone"></div></li> <li><a href="https://twitter.com/share" class="twitter-share-button"></a></li> </ul></div><div id="fb-root"></div>';var i;var d={facebook:{id:"facebook-jssdk",src:"//connect.facebook.net/en_US/all.js#xfbml=1&appId=255566051148260",selector:".fb-like","small-bubbles":{"data-send":"false","data-layout":"button_count","data-width":"105","data-show-face":"false"},bubbles:{"data-send":"false","data-layout":"box_count","data-width":"12","data-show-faces":"false"},small:{"data-send":"false","data-width":"85","data-show-face":"false"}},googleplus:{id:"gplus-api",src:"https://apis.google.com/js/plusone.js",selector:".g-plusone","small-bubbles":{},bubbles:{"data-size":"tall"},small:{"data-size":"small","data-annotation":"none"}},twitter:{id:"twitter-wjs",src:"//platform.twitter.com/widgets.js",selector:".twitter-share-button","small-bubbles":{"data-via":"firefox"},bubbles:{"data-via":"firefox","data-count":"vertical"},small:{"data-via":"firefox","data-count":"none"}}};var b=function(){c(f).parent().removeClass("open")};var j=function(m){var l=c(m).on("click.dropdown.data-api",this.toggle);c("html").on("click.dropdown.data-api",function(){l.parent().removeClass("open")})};j.prototype={constructor:j,scripts_loaded:false,toggle:function(n){var m=c(this).parent();var l=m.hasClass("open");b();if(!l){m.toggleClass("open")}a=c(e).css("width",d.facebook["small-bubbles"]["data-width"]);j.prototype.load_sharing();return false},load_sharing:function(){if(!this.scripts_loaded){for(var l in d){this.load_script(d[l].src,d[l].id)}this.scripts_loaded=true}},load_script:function(n,o){var l=document.getElementsByTagName("script")[0];var m=document.getElementById(o);if(!m){m=document.createElement("script");m.id=o;l.parentNode.insertBefore(m,l)}m.src=n}};c.fn.dropdown=function(l){return this.each(function(){var n=c(this);var m=n.data("dropdown");if(!m){n.data("dropdown",(m=new j(this)))}if(typeof l==="string"){m[l].call(n)}})};c.fn.dropdown.Constructor=j;var h=function(m,l){d.twitter["small-bubbles"][m]=l;d.twitter.bubbles[m]=l};c(function(){c("html").on("click.dropdown.data-api",b);c("body").on("click.dropdown.data-api",f,j.prototype.toggle);a=c(k);var m=a.attr("data-tweet-at");if(m){h("data-via",m)}var l=c('meta[property="og:title"]');if(l){h("data-text",l.attr("content"))}var o=c('meta[property="og:url"]');if(o){h("data-url",o.attr("content"))}a.append(g);for(var n in d){a.find(d[n].selector).attr(d[n][a.attr("data-type")])}})})(window.jQuery);
+(function(c){var f='[data-toggle="dropdown"]';var k=".socialshare";var e='.socialshare.open[data-type="small-bubbles"] .share-options div.fb-like iframe';var a;var g='<div class="dropdown-toggle" data-toggle="dropdown"> <div class="share-link"><div> <div class="heart"></div> <p class="text">Share This</p> <div class="caret"><div></div></div></div> </div><div class="clear"></div><div class="share-options"> <ul> <li><div class="fb-like"></div></li> <li><div class="g-plusone"></div></li> <li><a href="https://twitter.com/share" class="twitter-share-button"></a></li> </ul></div><div id="fb-root"></div>';var i;var d={facebook:{id:"facebook-jssdk",src:"//connect.facebook.net/en_US/all.js#xfbml=1&appId=255566051148260",selector:".fb-like","small-bubbles":{"data-send":"false","data-layout":"button_count","data-width":"105","data-show-face":"false"},bubbles:{"data-send":"false","data-layout":"box_count","data-width":"12","data-show-faces":"false"},small:{"data-send":"false","data-width":"85","data-show-face":"false"}},googleplus:{id:"gplus-api",src:"https://apis.google.com/js/plusone.js",selector:".g-plusone","small-bubbles":{},bubbles:{"data-size":"tall"},small:{"data-size":"small","data-annotation":"none"}},twitter:{id:"twitter-wjs",src:"//platform.twitter.com/widgets.js",selector:".twitter-share-button","small-bubbles":{"data-via":"firefox","data-related":"firefox"},bubbles:{"data-via":"firefox","data-count":"vertical","data-related":"firefox"},small:{"data-via":"firefox","data-count":"none","data-related":"firefox"}}};var b=function(){c(f).parent().removeClass("open")};var j=function(m){var l=c(m).on("click.dropdown.data-api",this.toggle);c("html").on("click.dropdown.data-api",function(){l.parent().removeClass("open")})};j.prototype={constructor:j,scripts_loaded:false,toggle:function(n){var m=c(this).parent();var l=m.hasClass("open");b();if(!l){m.toggleClass("open")}a=c(e).css("width",d.facebook["small-bubbles"]["data-width"]);j.prototype.load_sharing();return false},load_sharing:function(){if(!this.scripts_loaded){for(var l in d){this.load_script(d[l].src,d[l].id)}this.scripts_loaded=true}},load_script:function(n,o){var l=document.getElementsByTagName("script")[0];var m=document.getElementById(o);if(!m){m=document.createElement("script");m.id=o;l.parentNode.insertBefore(m,l)}m.src=n}};c.fn.dropdown=function(l){return this.each(function(){var n=c(this);var m=n.data("dropdown");if(!m){n.data("dropdown",(m=new j(this)))}if(typeof l==="string"){m[l].call(n)}})};c.fn.dropdown.Constructor=j;var h=function(m,l){d.twitter["small-bubbles"][m]=l;d.twitter.bubbles[m]=l};c(function(){c("html").on("click.dropdown.data-api",b);c("body").on("click.dropdown.data-api",f,j.prototype.toggle);a=c(k);var m=a.attr("data-tweet-at");if(m){h("data-via",m)}var l=c('meta[property="og:title"]');if(l){h("data-text",l.attr("content"))}var o=c('meta[property="og:url"]');if(o){h("data-url",o.attr("content"))}a.append(g);for(var n in d){a.find(d[n].selector).attr(d[n][a.attr("data-type")])}})})(window.jQuery);
View
8 small.html
@@ -2,9 +2,11 @@
<html>
<head>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
- <meta property="og:title" content="Owen is awesome">
- <meta property="og:url" content="http://owencoutts.com">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta property="og:title" content="Introducing Collusion - mozilla.org">
+ <meta property="og:site_name" content="Mozilla">
+ <meta property="og:image" content="http://mozcom-cdn.mozilla.net/img/firefox-100.jpg">
+ <meta property="og:url" content="https://www.mozilla.org">
<title>Social Share</title>
<link rel="stylesheet/less" href="demo/demo.less" type="text/css">
Please sign in to comment.
Something went wrong with that request. Please try again.