Adding a 'Open in a new window' link on SharePoint document libraries
by Hari Menon
JavaScript
$(document).ready(function() {
$("td[class='ms-vb-title'] table[class='ms-unselectedtitle'] tbody tr td[class='ms-vb'] a").each(function() {
var externalWindowLink = ' <a href="' + $(this).attr("href") + '" target="_blank" title="Click here to open the link in a new window"><span style="color:green;font-size:smaller;">New Window</span></a>';
$(this).parent().append(externalWindowLink);
});
});