You’ll have to be more specific about what you actually did so we can figure out where it is going wrong for you.
The above solution continues to work for me.
Specifically, I implemented the following under Administration, Look & Feel, Presentation, HTTP Meta Info:
<script>
function fixExternalLinks() {
document.querySelectorAll('.wikiexternallink a').forEach(function(link) {
if (link.hasAttribute('target') == false) {
link.setAttribute('target', '_blank');
}
})
}
document.addEventListener("DOMContentLoaded", fixExternalLinks);
</script>
Basically, the javascript code code executes once the page is loaded, looks for any external links and if they do not already have a target specified, gives it a _blank target.