Skip to content

Instantly share code, notes, and snippets.

@mhawksey
Created October 3, 2011 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhawksey/1260250 to your computer and use it in GitHub Desktop.
Save mhawksey/1260250 to your computer and use it in GitHub Desktop.
Kindle It widget
l = 'http://fivefilters.org/kindle-it/send.php?url='+encodeURIComponent(window.location.href);
e = l+'&context=download&format=epub';
m = l+'&context=download&format=mobi';
function pop(){
h = 527;
w = 873;
wd = window.open(l, 'KindleIt','scrollbars=no,menubar=no,height='+h+',width='+w+',resizable=yes,toolbar=no,location=no,status=no,top='+((screen.height/2)-(h/2))+',left='+((screen.width/2)-(w/2)));
}
document.write('<p style="text-align:center;font-weight:bold;"><a href="javascript:void(0);" onclick="pop()">Kindle It</a> | <a href="'+e+'" target"_blank">ePub</a> | <a href="'+m+'" target"_blank">mobi</a></p>');
document.write('<p style="text-align:center;">Powered by <a href="http://fivefilters.org/kindle-it/">FiveFilters.org</a> (<a href="http://fivefilters.org/fundraising/donate.php?id=kindle-it-v1">donate</a>)</p>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment