Err this is not related to android and this question is about to be marked as a duplicate of android related question. ???
I need to remove target=_blank
from all hyper links so that all links will be opened in the same webview.
When i searched for similar Q&As most of them suggested injecting a javascript which would convert all target=_blanks
to _self
. I am testing this in a browser window first, and the script indeed converts all hyperlinks but it has no effect, it still continues to open in a new window. How can I force it to open in same window/webview ?
var a = document.getElementsByTagName("a");
for (i=0; i<a.length; i++)
if (a[i].target == "_blank")
a[i].target = "_self";