Skip to content

Instantly share code, notes, and snippets.

@earthboundkid
Created September 29, 2014 13:47
Show Gist options
  • Save earthboundkid/81cea42b7ea5bb011781 to your computer and use it in GitHub Desktop.
Save earthboundkid/81cea42b7ea5bb011781 to your computer and use it in GitHub Desktop.
javascript:
if (location.href.indexOf('stereotastic.com/') > -1 ) {
var re = /\/[A-Za-z0-9]{6}$/;
var m = re.exec(location.href);
if (m[0] != null) {
var wiggle_url = 'http://stereotastic.com/img/user'+m[0]+'.gif';
var tumblr_share_url =
"http://www.tumblr.com/share/photo?source="+encodeURIComponent(wiggle_url)
+ "&caption=" + encodeURIComponent('<p><a href="'+location.href+'">Stereotastic</a></p>')
+ "&click_thru=" + encodeURIComponent(location.href)
+ "&tags=" + encodeURIComponent('3DS, Wigglepic');
window.open(tumblr_share_url,'_blank');
void(0);
} else {
alert('No URL match.');
}
} else {
alert('Not on Stereotastic.');
}
void(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment