mortenn / browserpicker Goto Github PK
View Code? Open in Web Editor NEWSmart browser selector for Windows
License: MIT License
Smart browser selector for Windows
License: MIT License
Would be great to easily discover the browserpicker.exe from the start menu, or Windows search
The new prefix/regex matching rules need to be documented.
Microsoft Edge private mode button isn't displayed.
What I've tested is this works:
public string PrivacyArgs { get { switch (Name) { .... case "Microsoft Edge": return " -inprivate "; ....
Depends on #7
If user does not want to use any of the autodetected browsers, let them disable them.
The edge icon in the browser list should match the new edge.
For firefox and chrome (others?)
To keep it clean, Win32 specific things, such as Registry should be segregated into a separate project, to at least pretend this could go cross platform in the future.
Nice project @mortenn, you README.md states to download the latest MSI, can you please provide a link to that (https://github.com/mortenn/BrowserPicker/releases/latest) in the README.md?
Also, if possible have the executables in a 7z or Zip file, to deploy without an MSI.
When you have multiple displays, having the ability to move the window to a different screen is useful
Would be a nifty addition.
The registry scan isn't very expensive, so might as well start it on launch, with a delay and let it run in the background.
This way, if the user expects a browser but don't see it, because they just installed it, it would appear like magic after a couple seconds so long as they don't make a selection.
Prefix rules aren't matching correctly
After upgrading to the new edge browser in windows, it does not automatically appear in BrowserPicker, needing the user to manually intervene.
I do not want to run the detection code on every single startup, so maybe save a timestamp for when to do it next?
Seems an obvious step to make the UrlShortener and JumpPage lists user configurable
There should be a way to change the timeout setting without having to dive into regedit
The current browser scan logic only detects system-wide browsers.
If a user has, say, firefox or chrome installed to their profile, the browser is not available to pick automatically.
Seems like a good feature to add to URL fragments
Rather than having a checkbox, make a separate button on each browser option to launch it in privacy mode, so the user only needs to do one click.
Using 1-9 with the alt button pressed could activate privacy mode for accessibility.
Links from Microsoft Teams have 'safe link' handling, e.g. https://staticsint.teams.cdn.office.net/evergreen-assets/safelinks/1/atp-safelinks.html?url=https%3A%2F%2Fregistry.terraform.io%2Fproviders%2Fhashicorp%2Fazurerm%2Flatest%2Fdocs%2Fresources%2Fprivate_dns_zone_virtual_network_link&locale=en-gb.....
. which breaks default rules.
It would be great to decode the Teams link to display and use the underlying link for default rules.
When user is opening a local html file with a space in the path, the url is mangled as it is handed off to the browser
I often find myself losing track of the browser picker window after it appears. While it can always be alt-tabbed to, it doesn't have a task bar presence, so it can get lost if you click away to another window after you open it. Additionally, in some cases it'll actually open itself behind the current window you're in (click a link in the VS Code powershell terminal seems to do this).
It'd be nice if there was an option to keep the window on top no matter what. In theory, you're going to want to select a browser immediately after opening the program, so I can't really think of a scenario in which you wouldn't want it right in front of you.
Depends on mozilla/multi-account-containers#365
Rather than forcing the user to type in |prefix|... etc, it would be nice to have a dropdown bound to the new enum type and introduce a ViewModel rather than using a raw string
Yes, that's the expected behavior, but probably it's not what everyone wants.
So I found the BrowserPicker a few minutes ago and wanted to at least look at it, but I had my browser open with some livestreams going etc., so I didn't want to close my browser yet. Double clicking the executable doesn't work either.
Had to look at the code to figure out how to do this, so I found a workaround:
I made a new DWORD (32 bit) value that is set to 1 in HKEY_CURRENT_USER\Software\BrowserPicker .
Can we please make some FAQ section to readme or add wiki for the project and mention this somewhere? Or even better, explain all registry keys that BrowserPicker uses.
Depends on #7
Let user set an option that defaults privacy mode to on
I would like to run BrowserPicker without register it into Program list at Windows' Control Panel. Is it possible to develop or release a (portable?) version without installer?
Thank you!
I have some sites that I use where matching on the hostname isn't sufficient. For example, with Azure DevOps the URLs are https://dev.azure.com/org1/...
, https://dev.azure.com/org2/...
and I want to be be able to direct each to a different browser.
Would you be open to a PR that added the ability to match on (for example) the full prefix of the URL rather than suffix match on the hostname? Or maybe regex matches?
Seems like it would be useful for QA people
Seems like some users would want this.
When I open any link using the new release, 1.8.2, I get the following exception in a message box:
---------------------------
---------------------------
Value cannot be null.
Parameter name: name at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at Microsoft.Win32.RegistryKey.ValidateKeyName(String name)
at Microsoft.Win32.RegistryKey.CreateSubKeyInternal(String subkey, RegistryKeyPermissionCheck permissionCheck, Object registrySecurityObj, RegistryOptions registryOptions)
at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, Boolean writable)
at BrowserPicker.Configuration.Config.SetBrowsers(IEnumerable`1 browsers)
at BrowserPicker.ViewModel.FindBrowsers()
at BrowserPicker.ViewModel.Initialize()
at BrowserPicker.App.<OnStartup>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at BrowserPicker.App.Main()
---------------------------
OK
---------------------------
Downgrading to 1.7.1 restores functionality.
When the option is off, as it stands, it will simply stop updating the counter.
Should we add UI to manage the order manually, or do it alphabetically?
When right clicking on a link in a browser it should have the option "Open link in ....". (Navigates to link but in different browser)
When right clicking on any tab/window "Open in .....". (Duplicates current tab/window but in a different browser)
I have a feeling this may require a browser extension, but here's hoping it won't.
After Win32 has been abstracted out, may as well build a separate backend for doing configuration in a .json file
This file should be saved somewhere in the users home folder.
For Windows, the appropriate location would be in AppData/Roaming
Had a look at the new release and it looks real nice! Was wondering if there's any chance of support for multiple Chrome profiles in future versionsa?
Scenario:
Currently, this shows the browser picker window, without the disabled browser shown.
In this scenario, the browser picker should not show unless the "always show" option is enabled.
Some users might want to have special cases - extra command line arguments or non-compatible browsers
This would be very useful, because sometimes you need just the link (for example, when some buttons in some apps try to open a link), but don't want to open your browser.
I don't plan to update to new versions anyway, because new versions require .NET 4.8 and I don't want to install it, so I'll keep using version 1.7.0. For other people that want to use old version but still want a way to copy URL to clipboard, here's the workaround:
Create a batch script (any text file with «.bat» as the extension) and paste this line: echo | set /p dummyName="%~1" | clip
Optionally, find any .png icon that symbolizes copying for you. You might need to change DPI so that icon is about 1 cm both vertically and horizontally.
Use the «Add browser» button to add your script as URL handler to BrowserPicker, use your icon as image, add any name you like. Worked for me on Windows 10 LTSC.
Multiple users could be running browsers on the system
Move over to .NET 5 or 6 to at least enable cross platform on paper, after Win32 calls have been isolated.
In #6 (Support incognito mode) you said
edge does not support this. https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/9245247-inprivate-command-line-switch
However, there's an option to open a "New InPrivate window" in MS-Edge's Jump List, so I searched around and found that it can be launched in private mode via the command line by running
start shell:AppsFolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge -private
and I've tested and found that you can add a url on the end of that (don't put it in quotes though), so if you want to launch MS Edge in an InPrivate window and go to this project on GitHub BrowserPicker should execute it like
shell:AppsFolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge -private https://github.com/mortenn/BrowserPicker
Add ability to edit URL before opening. It would help to clear referrer and to copy to clipboard.
Keep tally of how many times the user picked each browser, then display the list ordered by popularity
Dear @mortenn
This app does not work in Windows 10.
Please fix this issue
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.