Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
var itemsByIndex = []; var itemsByObject = []; items = document.body.getElementsByTagName('li'); for (var i=0; i<items.length; i++) { itemsByIndex[i] = items[i]; itemsByObject[items[i]] = i; } window.status = 'itemsByIndex:' + itemsByIndex.length + ', ItemsByObject:' + itemsByObject.length; // itemsByIndex shows the proper count but itemsByObject is empty?
This paste will be private.
From the Design Piracy series on my blog: