I often want to show my flickr.com photos in bulletin boards (mainly vBulletin).
Mostly HTML isn't allowed but flickr.com only provides the HTML code to embed the photo and embedding 2 or more photos is a pain.
So I created this bookmarklet - go to your flickr.com Photo Download Page and click on the bookmarked link to bring up a popup with the BBCode.
document.body.appendChild(document.createElement('script')).src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js';
window.setTimeout(function() {
if (!document.location.href.match("flickr.com")){
var gotoFlickr = confirm("This bookmarklet does not work at this page.\nDo you want to move over to Flickr?");
if (gotoFlickr){
document.location.href = "http://www.flickr.com/";
}
}
else {
var pictureurl = jQuery('input[name=textfield]').val();
var linkurl = 'http://flickr.com'+jQuery('a:first').attr('href');
var msg = 'Copy the following code to your clipboard:\n[URL='+linkurl+'][IMG]'+pictureurl+'[/IMG][/URL]';
alert(msg);
}
}, 1500);void(0);
Flickr BBCode Bookmarklet is ©)2008 by Dominik Hahn, dienase@gmail.com
Inspired by Learning jQuery's jQuery Bookmarklet and the Sumaato Localize Bookmarklet, compressed using the Bookmarklet Crunchinator.