Skip to content

Instantly share code, notes, and snippets.

@jethrolarson
Created June 2, 2009 23:15
Show Gist options
  • Save jethrolarson/122662 to your computer and use it in GitHub Desktop.
Save jethrolarson/122662 to your computer and use it in GitHub Desktop.
/*This is just a port of Arc90's Readibility bookmarklet
Props goes to them.
- Jethro Larson
*/
jetpack.statusBar.append({
html: <>
<div id="read">Readibility</div>
</>,
width: 70,
onReady: function(widget){
$(widget).click(function(){
$(jetpack.tabs.focused.contentDocument).find("body")
.append("<script>readStyle = 'style-novel';readSize = 'size-medium';readMargin = 'margin-wide';</script>")
.append('<script src="http://lab.arc90.com/experiments/readability/js/readability.js?x=' + Math.random()+'"></script>').end().find("head")
.append('<link href="http://lab.arc90.com/experiments/readability/css/readability.css" rel="stylesheet"/>')
.append('<link href="http://lab.arc90.com/experiments/readability/css/readability-print.css" rel="stylesheet" media="print" />');
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment