Skip to content

Latest commit

 

History

History
58 lines (37 loc) · 3.13 KB

README.md

File metadata and controls

58 lines (37 loc) · 3.13 KB

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.