-
Browsing images back and forth with JavaScript bookmarks (Firefox)
Jumping to the next picture, when the current URL points directly to an image file ending in a digit (an example), can be achieved by <a href="javascript:(function(){ var e,s; IB=1; function isDigit(c) { return (%220%22 <= c && c =0; –e) if (isDigit(L.charAt(e))) { for(s=e-1; s>=0; –s) if (!isDigit(L.charAt(s))) break; break; } ++s; if (e<0) return; oldNum = L.substring(s,e+1); newNum = %22%22 + (parseInt(oldNum,10) + IB); while (newNum.length bookmarking this piece of code I picked up at reddit:
javascript:(function(){ var e,s; IB=1; function isDigit(c) { return (%220%22 <= c && c =0; --e) if (isDigit(L.charAt(e))) { for(s=e-1; s>=0; --s) if (!isDigit(L.charAt(s))) break; break; } ++s; if (e<0) return; oldNum = L.substring(s,e+1); newNum = %22%22 + (parseInt(oldNum,10) + IB); while (newNum.length < oldNum.length) newNum = %220%22 + newNum; location.href = L.substring(0,s) + newNum + L.slice(e+1); })();
Another <a href="javascript:(function(){ var e,s; IB=-1; function isDigit(c) { return (%220%22 <= c && c =0; –e) if (isDigit(L.charAt(e))) { for(s=e-1; s>=0; –s) if (!isDigit(L.charAt(s))) break; break; } ++s; if (e<0) return; oldNum = L.substring(s,e+1); newNum = %22%22 + (parseInt(oldNum,10) + IB); while (newNum.length bookmark for jumping to the previous picture is a simple modification of the above with the variable
IB
assigned the value -1:javascript:(function(){ var e,s; IB=-1; function isDigit(c) { return (%220%22 <= c && c =0; --e) if (isDigit(L.charAt(e))) { for(s=e-1; s>=0; --s) if (!isDigit(L.charAt(s))) break; break; } ++s; if (e<0) return; oldNum = L.substring(s,e+1); newNum = %22%22 + (parseInt(oldNum,10) + IB); while (newNum.length < oldNum.length) newNum = %220%22 + newNum; location.href = L.substring(0,s) + newNum + L.slice(e+1); })();
-
Wishlist: virtual directories into galleries
Yet another idea for a Firefox extension: a thingy that turns those virtual directory listings with images into thumbnail galleries. Possibly with thumbnails scaled down from the originals by the browser’s simple resizing, or a fancy version with a JavaScript resizing algorithm.
-
foobar2000 0.9.5 Released
foobar2000.org (via Janne)