The script is very simple and straight forward, it first checks whether the link starts with "http" and then it also check whether the link contains any words that are similar to our domain name to ensure that no internal links are getting triggered in a new tab/Window when clicked. This way we're confident that only the external links are targeted to open in new tab/window.
Use the script below and you shall be good to go. Just replace the "zaha.in" with your domain name.
Did you Find it helpful?, drop a line and share it forward to help others. Have a nice day.