hip hop music

August 15, 2005

My First Movable Type Hack

For the longest I've been wishing that the "Insert Link" button on Movable Type's "new entry" page could create links that open in a new window, and save me the trouble of adding TARGET="_blank" to everything. Today I finally sat down and figured out how to make this happen. For anyone who might be interested, I just grabbed mt.js from my mt-static folder and changed line 163 from

setSelection(e, '<a href="' + my_link + '">' + str + '</a>');


setSelection(e, '<a target="_blank" href="' + my_link + '">' + str + '</a>');

I feel so smart and accomplished now! My mind is aglow with whirling transient nodes of thought, careening through a cosmic vapor of invention. (© Hedley Lamarr)

Posted by jsmooth995 at August 15, 2005 4:48 PM

Weblog Archives