Found the best solution to this problem.
In @Vincent Scheib's solution, you need to redirect the user to / some / url or open a new window (which may actually be blocked as a popup). All this is not so good from UX aproach.
My solution is to create an application and configure externally_connectable . You must pass the url domain of the website that will try to open the application. For instance:
"externally_connectable": { "matches": ["*://developer.chrome.com/*"] }
Then in your packaged application against the background of the script, you can do something like this:
chrome.runtime.onMessageExternal.addListener(function(message) { if(message.launch){
Finally, to open the application, you must send a message using your packaged application identifier. For instance:
chrome.runtime.sendMessage("mdoedhlejmepngilmgoenbhmipoclckb", { launch: true });
source share