Created
May 21, 2009 06:53
-
-
Save mcantelon/115322 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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