Because I don't use Edge as default browser, Microsoft keeps bothering me, asking me to open Microsoft Edge when I click on e.g. SharePoint links. I share here my solution to avoid it.
Note the use of the built-in microsoft-edge protocol to redirect to Edge.
Problem description
When opening a link to SharePoint in Chrome browser (e.g. also for Videos on Stream), I get following error/ message window "Open Microsoft Edge? A website wants to open this application."
and you have to click "Open Microsoft Edge" to get the url finally redirected to the Microsoft Edge browser.
It happens also when you click on the "View Online" menu from a local sync'ed file in your file explorer.
Solution
Using a Browser Redirector (I use Browser Tamer) I have added a rule to handle .sharepoint.com urls to be opened in the Edge browser.
Using Redirector Extension
I use in Chrome the Redirector extension and I have added the following redirector rule.
Using AutoHotkey
Without the redirector extension, you can also Shift+Click on a link to open with the default browser using an AutoHotkey script.
See Gist code example below:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#IfWinActive ahk_exe chrome.exe | |
; Shift Mouse click | |
+LButton:: ; <--- [Chrome] Open link in preferred browser | |
SavedClipboard := ClipboardAll ; Save the entire clipboard to a variable | |
Clipboard := "" ; Empty the clipboard to allow ClipWait work | |
Click Right ; Click Right mouse button | |
sleep, 100 ;(wait in ms) give time for the menu to popup | |
SendInput e ; Send the underlined key https://superuser.com/questions/1721702/how-to-show-the-underlines-for-navigation-key-hotkey-in-context-menu-when-ri that copies the link from the right click menu. see https://productforums.google.com/forum/#!topic/chrome/CPi4EmhqHPE | |
; See also https://stackoverflow.com/questions/62707998/chrome-windows10-right-click-context-menu-option-underline-on-key-missing Press Alt+Shift before Right-Click | |
ClipWait, 2 | |
sUrl := Clipboard | |
If (sUrl = "") { | |
Exit | |
} | |
Run %sUrl% ; Handled by Browser Tamer | |
Clipboard := SavedClipboard ; Restore the original clipboard | |
return |
This is implemented in the NWS PowerTool.
No redirect annoying window anymore!