Some assembly required

This blog is about unimplemented ideas. At least until they get ticked off; I suppose a few eventually will have implementations too, but fresh posts never will. Because that's the primary purpose of this blog: keeping track of ideas I'd like to dive into, or problems I'd like to see solved. Feel free to join me in implementing, or further developing these ideas. I don't mind working solo, but it's a whole lot more fun working in concert!

Friday, November 18, 2005

Automate double password confirmation typing by means of Greasemonkey

Ever seen, and really hated, one of these?


Wouldn't it be rather stylish to have a Greasemonkey script fill in the second entry as you type the first, when there was nothing written there in the first place? (Yes, it severely defeats the intended purpose of the double check, I know. But let's move on.)

A good solution to the above would look for any two password fields in any page, that do not have any other visible form widget between them, and attach an onkeypress handler to the first, passing on the event, or a copy of it, to the other field as well. Points of style for additionally verifying that they are not very far apart in the page flow using this, or some variant thereof:

function getScreenCoordinates( node )
var x = node.offsetLeft;
var y = node.offsetTop;
while( (node = node.offsetParent) )
x += node.offsetLeft;
y += node.offsetTop;
return { x:x, y:y };

The Google Reader blog mentioned a while ago how you synthesize your own mouse click events; I'm sure it's not far from how it's done with keyboard input. Their code looked like this:
function simulateClick( node )
var event = node.ownerDocument.createEvent( 'MouseEvents' );

event.initMouseEvent( 'click',
true, // can bubble
true, // cancellable
1, // clicks
50, 50, // screen coordinates
50, 50, // client coordinates
false, false, false, false, // control/alt/shift/meta
0, // button,
node );

node.dispatchEvent( event );

Blogger automated trackback ping tool

Write a Greasemonkey script which adds (outgoing) Trackback functionality to Blogger. I believe a good solution would be to add one or several links to the publish page, similar to my Blogger ping tool to trig each trackback ping manually.

My present favourite thought on how to accomplish this is by processing the published post's links (including both the optional Link: field and any <a href> tags in the post body), to sum up a list of outbound links. Then, for each link in that list, fetch the pointed to page, processing it for structured announcement of a trackback URI for that page (via the RDF markup standardized for this purpose -- there may be hairs to split about how to behave, in case a page would specify more than one trackback URI -- I'll leave that for further pondering and discussion). Filter out all the URLs from the list which did not yield one trackback URI. For each of the links left, add a "Trackback ping" link on the "post published" page.

Points for style awarded for stylishly formatting this list, relating it to A) the linked URL, B) the <a href>link contents</a>, C) the trackback ping of the resource. I'd appreciate any suggestions and HTML mockups very much; this is a bit of my weak spot.

Additional points of style for an additional list, clearly separated from the first, for the filtered out links (and marked as such) for the links lacking a trackback URI we could find, for human manual visit, to pick up any such trackback URIs (as I'm sure many are only marked up for human visitors to find), and related machinery to add the trackback URIs to these, and have ping functionality for them as well. (The mechanics part of which I will also manage myself without any problems.) Aid on the visiofunctional design, again, much appreciated.