Answer the question
In order to leave comments, you need to log in
What to specify in the manifest so that after loading the extension immediately opens a new tab?
What to specify in the manifest so that after loading the extension immediately opens a new tab?
In the manifest for extensions, I could not find the answer in Google, I will be very grateful to you!
Answer the question
In order to leave comments, you need to log in
Found:
chrome.runtime.onInstalled.addListener(function (object) {
chrome.tabs.create({url: "chrome://newtab"})
});
chrome.runtime.onInstalled.addListener(function (object) {
chrome.tabs.create({url: "http://yoursite.com/"}, function (tab) {
console.log("New tab launched with http://yoursite.com/");
});
});
"background": {
"scripts": ["background.js"],
"persistent": false
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question