Try using this javascript by using this question's accepted answer:
$('a[target="_blank"]').removeAttr('target');
Using the same question's most upvoted answer, try this aswell:
<a href="your_url" onclick="window.open('#','_blank');window.open(this.href,'_self');">
Using this question's accepted answer, try this:
Fiddle.
function openNewBackgroundTab(){
var a = document.createElement("a");
a.href = "http://www.google.com/";
var evt = document.createEvent("MouseEvents");
//the tenth parameter of initMouseEvent sets ctrl key
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0,
true, false, false, false, 0, null);
a.dispatchEvent(evt);
}
Here the tenth parameter sets the ctrl
key to be true. Then that just acts like a ctrl
+ click
and then that's opened in an another window without losing focus.