How to open a link in a new tab without seeing the URL in new tab?

I’ve been trying many things to make this work but nothing has yet. How can I open a website in a new tab and have it not show the URL being used? I got this idea from this website. The new tabs URL shows up as about:blank. However, I’ve not been able to get it to work. I’m new to Javascript so go easy on me! Thanks!!!

This is what I’ve tried:

function NewTab() {
    "", "_blank");


After digging through the website I was able to find the JS that opens a new tab “without” exposing the URL to the user:

var urlObj = new window.URL(window.location.href);
var url = ""

if (url) {
  var win;
  document.querySelector('a').onclick = function() {
    if (win) {
    } else {
      win =; = '0'; = '100vh';
      var iframe = win.document.createElement('iframe'); = 'none'; = '100%'; = '100%'; = '0';
      iframe.src = url;
<a>Press here</a>