More pumpkins! More interface hacks!
Oct. 26th, 2010 06:39 pmAnother flickr interface hack test:










































This gives me a box with code for entire set of photos as thumbnails in an Nx6 grid. Again, no clue if it's going to break RSS/layouts/feed readers, so please let me know if it does.
Here's the code:
Pumpkins chez Dan 2010










































This gives me a box with code for entire set of photos as thumbnails in an Nx6 grid. Again, no clue if it's going to break RSS/layouts/feed readers, so please let me know if it does.
Here's the code:
// ==UserScript==
// @name Blog flickr set
// @namespace tko-flickr-set
// @description Make cut and paste code for blogging entire sets of flickr photos as thumbnails
// @include http://www.flickr.com/photos/*/sets/*
// ==/UserScript==
var thumbsHTML = document.getElementById('setThumbs');
var allImages = thumbsHTML.getElementsByTagName('a');
var title = document.title.replace(/ - a set on Flickr/, '');
var code = '<h2><a href="' + location.href + '">' + title + '</a></h2>';
for (i = 0; i < allImages.length; ++i) {
code += '<a href="' + allImages[i].href +
'" title="' + allImages[i].title + '">' +
allImages[i].innerHTML + '</a>';
if (i > 0 && (i+1) % 6 == 0) {
code += '\n';
}
}
// Insert after the date
var insertPlace = document.getElementsByClassName('vsDetails')[0];
var newBox = '<h4>Embed Code</h4>' +
'<textarea name="embedHTML" onFocus="this.select();" rows="5" ' +
'style="width: 250px;" wrap="virtual">' + code + '</textarea>';
insertPlace.innerHTML = insertPlace.innerHTML + newBox;