A cross-platform Firefox extension that automatically opens specified websites in your default external browser (e.g., Chrome, Edge, Chromium) instead of loading them in Firefox.
This is useful for websites that don't work properly in Firefox but work fine in other browsers.
- π Automatically redirects specified domains to your default browser
- βοΈ Easy-to-use popup interface to manage redirect domains
- π Supports subdomains (e.g., adding
x.aialso redirectswww.x.ai,chat.x.ai, etc.) - πΎ Settings are saved and persist across browser restarts
- π₯οΈ Cross-platform: Works on Windows and Linux (Ubuntu)
- Open Firefox and go to
about:debugging - Click "This Firefox" in the left sidebar
- Click "Load Temporary Add-on..."
- Navigate to the extension folder and select
manifest.json
- Package the extension as a
.xpifile - Go to
about:addonsin Firefox - Click the gear icon and select "Install Add-on From File..."
- Select the
.xpifile
The native messaging host is required to open URLs in an external browser.
- Open the
native-host\windowsfolder - Right-click on
install_host.batand select "Run as administrator" - Follow the on-screen instructions
- Restart Firefox
-
Open a terminal and navigate to the extension folder:
cd /path/to/ioswitch/native-host/linux -
Make the scripts executable:
chmod +x install_host.sh ioswitch_host.sh
-
Run the installer with sudo:
sudo ./install_host.sh
-
Restart Firefox
Note for Ubuntu 22.04+: If you're using Firefox as a Snap package, the installer will automatically configure the native host for Snap. The same applies for Flatpak installations.
- Click the IO Switch icon (π) in the Firefox toolbar
- Add domains you want to redirect (e.g.,
x.ai,grok.com) - When you visit any of these domains, they will automatically open in your default browser
The extension comes pre-configured with:
x.aigrok.com
You can add or remove domains at any time through the popup interface.
- The extension monitors all web requests in Firefox
- When you navigate to a configured domain, the request is blocked
- The URL is sent to the native messaging host
- The native host opens the URL in your system's default browser
- The original Firefox tab is closed or shows a redirect page
This means the native messaging host isn't properly installed. Try:
- Re-run
install_host.batas Administrator - Make sure the registry key was created:
- Open
regedit - Navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\NativeMessagingHosts\ioswitch - The value should point to
C:\ioswitch\ioswitch.json
- Open
- Restart Firefox completely
If the native host doesn't work, you may need to allow PowerShell scripts:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser- Re-run the installer:
sudo ./install_host.sh - Check that the manifest symlink exists:
ls -la /usr/lib/mozilla/native-messaging-hosts/ioswitch.json
- For Firefox Snap (Ubuntu 22.04+), check:
ls -la ~/snap/firefox/common/.mozilla/native-messaging-hosts/ioswitch.json - Restart Firefox completely
- Make sure
xdg-openis installed:which xdg-open - Check your default browser:
xdg-settings get default-web-browser - Set a default browser if needed:
xdg-settings set default-web-browser google-chrome.desktop # or xdg-settings set default-web-browser chromium.desktop
- Check that your default browser is set correctly in system settings
- Verify the domain is in your redirect list
- Check the Firefox Browser Console (Ctrl+Shift+J) for error messages
- Remove the extension from Firefox (
about:addons) - Run
native-host\windows\uninstall_host.batas Administrator
- Remove the extension from Firefox (
about:addons) - Run:
sudo ./native-host/linux/uninstall_host.sh
ioswitch/
βββ manifest.json # Extension manifest
βββ background.js # Background script (intercepts requests)
βββ popup.html # Popup UI
βββ popup.js # Popup logic
βββ redirect.html # Fallback page (when native host unavailable)
βββ icon.svg # Extension icon
βββ README.md # This file
βββ native-host/
βββ windows/ # Windows native host files
β βββ ioswitch.json # Native messaging manifest
β βββ ioswitch_host.bat # Batch wrapper
β βββ ioswitch_host.ps1 # PowerShell script (opens URLs)
β βββ install_host.bat # Installer (run as admin)
β βββ uninstall_host.bat # Uninstaller (run as admin)
βββ linux/ # Linux native host files
βββ ioswitch.json # Native messaging manifest
βββ ioswitch_host.sh # Shell script (opens URLs)
βββ install_host.sh # Installer (run with sudo)
βββ uninstall_host.sh # Uninstaller (run with sudo)
This extension:
- Does NOT collect any data
- Does NOT send any data to external servers
- Only stores your list of redirect domains locally in Firefox
MIT License - Feel free to modify and distribute.