Skip to content

A script on Windows that sets itself as a default browser and redirects the link protocol handlers HTTP, HTTPS, and FTP for opening links in different browsers with custom arguments.

License

Notifications You must be signed in to change notification settings

XP1/Default-browser-redirector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Default browser redirector

This script on Windows sets itself as a default browser and redirects the link protocol handlers HTTP, HTTPS, and FTP for opening links in different browsers with custom arguments.

Qualifications

  • Are you a power user who uses multiple browsers?
  • Do you want to keep browsing sessions separate for different websites?
  • Do you want to control which websites open in which browser and in either a new tab or new window?
  • Are you tired of manually copying and pasting links into the correct browser?

Requirements

Installation

  1. In the "src" directory, run "Install default browser redirector.bat" as administrator.

  2. Start > Run (Win + R) > ms-settings:defaultapps.

    Start > Settings (Win + I) > Apps > Default apps.

  3. Default browser redirector > Set default file types or link types for HTTP, HTTPS, and FTP > Set default.

Config file

The script and config file are installed to the "%AppData%\Default browser redirector" directory.

The "browser_rules.json" file contains the browsers and the rules in JSON format.

The first browser will be the default browser if no rules apply.

Browser property

  • Each browser provides a path to the executable. However, the "clipboard" property does not require it.
  • An optional arguments property can be a single string or an array of strings.
  • If the clipboard value is true, the URI is copied to the clipboard.

Rules property

  • The rules property is an array of strings or objects, containing text, regex, arguments, and clipboard properties.

Regex property

  • The regex property can be a single string or an object, containing pattern and flags properties.

Examples

An example "browser_rules.json" file is provided and must be edited with your custom values.

About

A script on Windows that sets itself as a default browser and redirects the link protocol handlers HTTP, HTTPS, and FTP for opening links in different browsers with custom arguments.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published