I am new to Chrome extension. I have a question about how to make the extension to open a "Help" page automatically after installation. Currently, I am able to check whether the extension is running the first time or not by saving a value into localStorage. But this checking is only carried out when using click the icon on the tool bar. Just wondering if there is a way that likes FF extension which uses the javascript in to open a help page after the installation. Thanks.
Edit: Thanks for the answer from davgothic. I have solved this problem. I have another question about the popup. My extension checks the url of current tab,
if OK(url){ //open a tab and do something } else{ //display popup }Is it possible to show the popup in this way?
How apps and extensions work. Apps and extensions work like regular programs for desktop computers, but they run entirely in the Chrome browser. You don't need to install software or restart your computer.
When you turn on Google Chrome browser sync, then all your chrome extensions will be automatically installed on all your devices. Also, the settings and state for all these extensions will be the same on all your devices.
If you see a message saying "Extensions Disabled," it's because Chrome has turned off one or more of your extensions to keep your data safe while you're browsing the Internet. The extensions that Chrome turned off either didn't come from the Chrome Web Store or were determined unsafe.
Check this updated and most reliable solution provided by Chrome: chrome.runtime Event
chrome.runtime.onInstalled.addListener(function (object) { let externalUrl = "http://yoursite.com/"; let internalUrl = chrome.runtime.getURL("views/onboarding.html"); if (object.reason === chrome.runtime.OnInstalledReason.INSTALL) { chrome.tabs.create({ url: externalUrl }, function (tab) { console.log("New tab launched with http://yoursite.com/"); }); } });
Add this to your background.js
I mean the the page you defined on manifest like following,
.... "background": { "scripts": ["background.js"], "persistent": false } ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With