Trying to get my website url not to show in address bar

Discussion in 'JavaScript' started by laurie.williams.75457, Apr 12, 2018.

  1. #1
    I have 4 simple extensions that every new tab my website opens. I am trying to get it to not show my url in the address bar. Any help in doing it for 1 or all 4 would be greatly appreciated.


    Chrome Extension:

    chrome.tabs.onCreated.addListener(
    function(tab){
    var newTabURL = {url: 'https://www.google.com'};

    if(tab.url === "chrome://newtab/")
    {
    chrome.tabs.update(newTabURL);
    }

    console.log(tab.url);
    }

    );



    Firefox Extension:

    browser.tabs.onCreated.addListener(
    function(tab){
    var newTabURL = {url: 'https://www.google.com'};

    if(tab.url === "about:newtab")
    {
    browser.tabs.update(newTabURL);
    }

    console.log(tab.url);
    }
    );



    Opera Extension:

    chrome.tabs.onCreated.addListener(
    function(tab){
    var newTabURL = {url: 'https://www.google.com'};

    if(tab.url === "chrome://startpage/")
    {
    chrome.tabs.update(newTabURL);
    }

    console.log(tab.url);
    }
    );



    Edge Extension:

    browser.tabs.onCreated.addListener(
    function(tab){
    var newTabURL = {url: 'https://www.google.com'};
    browser.tabs.update(newTabURL);
    console.log(tab.url);
    }
    );
     
    laurie.williams.75457, Apr 12, 2018 IP