terriko: (Default)
[personal profile] terriko
Another flickr interface hack test:

Pumpkins chez Dan 2010

IMG_1075IMG_1076Glowing vodka skullIMG_1080IMG_1081IMG_1082
IMG_1085IMG_1086IMG_1087IMG_1088IMG_1091IMG_1092
IMG_1093IMG_1094IMG_1095IMG_1096IMG_1097IMG_1098
IMG_1099IMG_1101IMG_1102IMG_1103IMG_1104IMG_1105
IMG_1106IMG_1107IMG_1108IMG_1109IMG_1110IMG_1111
IMG_1112IMG_1113IMG_1114IMG_1117IMG_1119IMG_1123
IMG_1124IMG_1129IMG_1131IMG_1132IMG_1135IMG_1137

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;



Profile

terriko: (Default)
terriko

January 2026

S M T W T F S
     123
45678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 6th, 2026 07:07 pm
Powered by Dreamwidth Studios