How darkhoundz/forced-browser works
Forced browser is a drop-in JavaScript script for captive-portal login or index pages. On page load it detects in-app browsers and presents an accessible prompt to open the current URL in a regular browser. The prompt supports platform-specific browser launch attempts, copying the URL (including a fallback), and dismissing the notice. The repository contains only one runtime file; the sampled excerpts do not show all detection-to-prompt wiring, so the graph avoids asserting uncertain internal calls.
Main entry points: forced_browser.js Forced browser script
Components 8
Other components
- Portal visitor
- Forced browser script
forced_browser.js - Webview detection
forced_browser.js - Browser prompt
forced_browser.js - Browser launch
forced_browser.js - Link copying
forced_browser.js - Browser runtime
- Regular browser
Connections 7
- Portal visitor → Browser runtime: loads portal page
- Browser runtime → Forced browser script: runs on load
- Forced browser script → Webview detection: detects webview
- Browser prompt → Browser runtime: creates dialog
- Browser launch → Regular browser: opens URL
- Link copying → Browser runtime: copies URL
- Portal visitor → Browser prompt: chooses action