I have made an extension for chrome, which opens a specific website when new tab is opened. However it works fine with chrome, but when the same extension (with changes in manifest to make it compatible with edge) is tested on microsoft edge, then on opening a new tab it loads the website, but also loads the url in the website, which I don't want. I want to website to be loaded, but not the URL, as chrome doesn't load the url. I have done something like :
CHROME:
chrome.tabs.onCreated.addListener(
function(tab){
var newTabURL = {url: 'http://www.example.com'};
if(tab.url === "chrome://newtab/")
{
// chrome.tabs.update(newTabURL);
}
console.log(tab.url);
}
);
EDGE:
function handleCreated(tab) {
var newTabURL = {url: 'https://www.example.com'};
browser.tabs.update(newTabURL);
}
browser.tabs.onCreated.addListener(handleCreated);
When a new tab is opened, the url is loaded, but I dont want the url to be shown.