Skip to content

Instantly share code, notes, and snippets.

@JoelBesada
Forked from omarrr/Backtick_Tumblr.md
Last active December 30, 2015 20:29
Show Gist options
  • Save JoelBesada/7880974 to your computer and use it in GitHub Desktop.
Save JoelBesada/7880974 to your computer and use it in GitHub Desktop.
var d = document,
w = window,
e = w.getSelection,
k = d.getSelection,
x = d.selection,
s = (e ? e() : (k) ? k() : (x ? x.createRange().text : 0)),
f = 'http://www.tumblr.com/share',
l = d.location,
e = encodeURIComponent,
p = '?v=3&u=' + e(l.href) + '&t=' + e(d.title) + '&s=' + e(s),
u = f + p;
try {
if (!/^(.*\.)?tumblr[^.]*$/.test(l.host)) throw (0);
tstbklt();
} catch (z) {
a = function () {
if (!w.open(u, 't', 'toolbar=0,resizable=0,status=1,width=450,height=430')) l.href = u;
};
a();
}
void(0)
{
"name": "Post to Tumblr",
"description": "Post the content from the current page to your Tumblr blog.",
"icon": "https://backtickio.s3.amazonaws.com/icons/tumblr.png",
"link": "http://tumblr.com"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment