Skip to content

Instantly share code, notes, and snippets.

@mcantelon
Created May 21, 2009 06:53
Show Gist options
  • Save mcantelon/115322 to your computer and use it in GitHub Desktop.
Save mcantelon/115322 to your computer and use it in GitHub Desktop.
jetpack.statusBar.append({
html: "<i>IMG</i>",
width: 45,
onReady: function(widget){
$(widget).click(function() {
jetpack.notifications.show("Extracting!");
$(jetpack.tabs.focused.contentDocument)
.find('a > img')
.each(function() {
var src = $(this).parent().attr('href');
if (src.indexOf('://') == -1) {
src = 'http://' + jetpack.tabs.focused.contentDocument.location.hostname + '/' + src;
}
jetpack.tabs.open(src);
})
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment