Can my Chrome extension open a link in another profile?

I use two different Chrome profiles (users) on my laptop: one for my work material and one for personal viewing.

Sometimes I click a link from HipChat and open it in my personal profile, even if it works (for example, login.work.com). (This is due to the fact that I recently ended up in my personal chrome window.)

I would like to make a chrome extension that I can install in my personal profile to match the * .work.com URLs and send them to the work profile window.

I did not find a way to open the URL in another profile. Does anyone know a way?

(The hacker idea I got from reading https://superuser.com/a/289618 , maybe I could put something along the lines google-chrome --user-data-dir=$work_profile , but I was would be happier if there was a JS API, and I did not need to ask for permission to run programs on the user's computer.)

+8
source share
3 answers

There is no solution for this. To do this, you need a handler, a separate program that grabs the URL before it reaches Chrome, analyzes your preferences for which URLs go to which profile, and then launches the specified Chrome installation with the specified profile flags.

However, afaik, such a program does not exist (at least on Windows).

In addition, Chrome can’t even choose which profile out of many is selected when Chrome is launched from the “call URL to open” function and DOES NOT start by clicking on the Chrome application shortcut activated by the user (with a specific choice of the instruction profile).

Naturally, the latter works 100% wonderfully on Firefox, which has a built-in profile selector after launching the browser, and no matter what method was used to launch Firefox (the user clicks on the Firefox icon or the OS channel “open” URL in Firefox) .

So there is no solution in Chrome.

+1
source

Drop the answer in case it is useful to anyone.

I made my Chrome CopyTabs extension ( https://chrome.google.com/webstore/detail/copytabs/obkbjogekcjalnaebheboejhfkamadkg ) to do something similar. It can open links, current tabs, selected tabs or windows, in the current Chrome user profile, another Chrome user profile, or another browser entirely.

I used chrome.exe --profile-directory="profileName" to open the URLs in the selected profile, but it has a handler that runs on the user machine, and profileName is the internal name of the chrome profile, for example --profile-directory="Profile1" instead of --profile-directory="My Name As Profile" .

Thus, in order to answer your question, no, I don’t think that in any case there is a local handler on the user's machine to achieve this functionality.

0
source

Although the question is old, but maybe someone is looking for an answer.

In new versions of chrome, when you right-click on a link, in the pop-up menu it is possible to open the link in another profile. For this, for example, in Chrome there must be several user profiles.

It works like a charm!

Hope this helps.

-1
source

All Articles