Skip to content

@adamcbrewer /facebook.share.html
Last active

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Social: Custom sharing links
<a id="fb-share-popup" href="http://www.facebook.com/sharer.php?s=100&amp;p[title]=____&amp;p[url]=____&amp;p[summary]=____&amp;p[images][0]=____" target="_blank">share on Facebook</a>
<script>
// This will open our link in a new, small window in the middle of the browser
var p = {};
p.w = 700;
p.h = 400;
p.l = (screen.width/2)-(p.w/2);
p.t = (screen.height/2)-(p.h/2);
$('#fb-share-popup').on('click', function (evt) {
evt.preventDefault();
newwindow = window.open(this.href, this.title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width='+p.w+', height='+p.h+', top='+ p.t +', left='+p.l);
if (window.focus) newwindow.focus();
});
</script>
<a id="gp-share-popup" href="https://plus.google.com/share?url=____" target="_blank">Share on Google Plus</a>
<script>
// This will open our link in a new, small window in the middle of the browser
var p = {};
p.w = 700;
p.h = 400;
p.l = (screen.width/2)-(p.w/2);
p.t = (screen.height/2)-(p.h/2);
$('#gp-share-popup').on('click', function (evt) {
evt.preventDefault();
newwindow = window.open(this.href, this.title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width='+p.w+', height='+p.h+', top='+ p.t +', left='+p.l);
if (window.focus) newwindow.focus();
});
</script>
<a id="tw-share-popup" href="http://twitter.com/intent/tweet?url=____&text=____&hashtags=____,____,____" target="_blank">Share on Twitter</a>
<script>
// This will open our link in a new, small window in the middle of the browser
var p = {};
p.w = 700;
p.h = 400;
p.l = (screen.width/2)-(p.w/2);
p.t = (screen.height/2)-(p.h/2);
$('#tw-share-popup').on('click', function (evt) {
evt.preventDefault();
newwindow = window.open(this.href, this.title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width='+p.w+', height='+p.h+', top='+ p.t +', left='+p.l);
if (window.focus) newwindow.focus();
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.