Opening external links in new tab?

My aforementioned HTML blocks

can change the default on a site using
<base target="_blank" />
Then the second block contains Javascript to exclude internal links from this.

I’m confident this solution would satisfy @darrenstehle , but my problem is I don’t know how to create a Micro.blog plugin to allow him to add this to his site (and me to blog.w4rner.com).
Could you @manton or someone else help me get this onto a plugin?