Created
August 16, 2012 04:15
-
-
Save pentaphobe/3366770 to your computer and use it in GitHub Desktop.
A bookmarklet which exposes the tumblr bookmark to multiple photo URLs (WIP)
This file contains 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
var f=function () { var photoUrl = document.getElementById("photo_src"); photoUrl.name="external_urls[]"; photoNode = photoUrl.cloneNode(false); photoNode.id = "photo_extra"; photoNode.removeAttribute("onkeydown"); var counter = 1; var linker = document.createElement("a");linker.setAttribute("onclick", "javascript:addUrl()"); linker.innerHTML = '+'; console.log(linker); photoUrl.parentNode.insertBefore(linker, photoUrl); addUrl = function() { var newEntry = photoNode.cloneNode(false); newEntry.id += counter; counter += 1; photoUrl.parentNode.insertBefore(newEntry, photoUrl); }; console.log(photoUrl); console.log(photoNode); console.log(linker); };f() |
Hey I found this through Google. I've been trying to find an alternative Tumblr bookmarklet allow for posting multiple photos from a page at once. It seems like you've created a solution, but I have no idea how to make it work. Total noob here :-/ How can I get your bookmarklet modification to work on my browser? Any help would be much appreciated. Thanks.
Apologies - I apparently didn't have notifications on!
You can copy-paste this into a URL in your browser's bookmark manager, but this hasn't been touched (evidently) in a long time.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is this monstrocity?
Tumblr has support on the server side for including multiple images in a photo link, but their bookmarklet doesn't expose this functionality, meaning that multi-photo posts are restricted to either hotlinking to other people's images, or manually inserting mirrored images.
This little bookmarklet will make it possible to include multiple images from the Tumblr Bookmarklet and have them automatically mirrored on your blog.
Fairly bare-bones at the moment, it does no clever processing when you add an extra photo url.
Notes
It's also not making many cross-browser considerations at present.
Ideal future: modify the photo selector to be multi-select and create the photo inputs dynamically whilst retaining the plus button for additional external URLs.