A desktop browser with x402 built in: when a page asks for payment, it pays in stablecoins and shows the content.

9 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-browser.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-browser.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-browser.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 toolbar: Back and Forward are greyed out when there's nowhere to go cc08c7a 1 week, 2 days ago History
urls.ts · 500 bytes · 16 lines
1/**
2 * Which URLs may be handed to the operating system. Only plain http(s): never file:, a
3 * custom-scheme app launcher, javascript:, or a URL with embedded credentials.
4 */
5export function safeExternalUrl(input: unknown): string | null {
6 if (typeof input !== "string") return null;
7 let u: URL;
8 try {
9 u = new URL(input);
10 } catch {
11 return null;
12 }
13 if (u.protocol !== "https:" && u.protocol !== "http:") return null;
14 if (u.username || u.password) return null;
15 return u.href;
16}