WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
<script language="JavaScript1.2" type="text/JavaScript" src="<?php echo TEMPLATE_DIR; ?>/linkstarget.js"></script>
//1)Enter domains to be EXCLUDED from opening in new window:var excludedomains=["yourdomain.com", "www.yourdomain.com"]//2)Automatically open offsite links in new window? (1=yes, 0 will render a checkbox for manual selection)var auto=1var excludedomains=excludedomains.join("|")rexcludedomains=new RegExp(excludedomains, "i")if (!auto)document.write('<form name="targetmain"><input type="checkbox" name="targetnew" checked onClick="dynamiclink()">Open off-site links in new window</form>')function dynamiclink(){if (auto||(!auto&&document.targetmain.targetnew.checked)){for (i=0; i<=(document.links.length-1); i++) {if (document.links[i].hostname.search(rexcludedomains)==-1&&document.links[i].href.indexOf("http:")!=-1)document.links[i].target="_blank"}}elsefor (i=0; i<=(document.links.length-1); i++) {if (document.links[i].hostname.indexOf(mydomain)==-1)document.links[i].target=""}}if (auto)window.onload=dynamiclink
$("a").filter(function() { return this.hostname && this.hostname !== location.hostname;}).addClass('external').attr("target", "_blank");
a.external { background: url(/path/to/your image/external.png) center right no-repeat; padding-right: 13px;}