import React from "react"; import {ActionInput, Button, Header, Message, Panel, Stack} from "../ui"; import {detectBrowser} from "./browserDetect"; // The WROLPi browser extension is distributed off-store: Chrome users // sideload the unpacked .zip; Firefox users get a Mozilla-signed .xpi that // installs in one click. Both binaries are served by the local WROLPi // backend so this page works on a fully air-gapped install. const CHROME_ZIP_PATH = '/api/extensions/wrolpi-chrome.zip'; const FIREFOX_XPI_PATH = '/api/extensions/wrolpi-firefox.xpi'; function formatSize(bytes) { if (!bytes) return ''; const kb = bytes / 1024; if (kb < 1024) return `${kb.toFixed(0)} KB`; return `${(kb / 1024).toFixed(2)} MB`; } function DestinationHint() { // The user is currently viewing this WROLPi at exactly window.location.origin. // That's the URL they need to paste into the extension's destination field. const origin = (typeof window !== 'undefined' && window.location && window.location.origin) || ''; const [copied, setCopied] = React.useState(false); const onCopy = async () => { try { await navigator.clipboard.writeText(origin); setCopied(true); setTimeout(() => setCopied(false), 1500); } catch { // Older / non-secure contexts may block the clipboard API. // Fall through silently — the user can still copy manually. } }; return
This WROLPi's URL

After installing the extension, paste this URL into the destination field on the extension's options page.

{copied ? 'Copied' : 'Copy'} } />
; } function FirefoxCard({metadata, version}) { const file = (metadata && metadata.files && metadata.files['wrolpi-firefox.xpi']) || {}; const available = !!file.available; return
Firefox{version ? ` — v${version}` : ''}

One-click install. Mozilla has signed this build.

Firefox will ask you to confirm the install. Accept the prompt.

After installing
  1. Open the extension's Options page (right-click the toolbar icon → Manage Extension → Options) and add this WROLPi as a destination. Click Test to grant API access.
  2. Click the extension icon in the toolbar → the permission dropdown → Always Allow on this site. Firefox requires this second click in addition to the Test grant — without it, the extension can talk to your WROLPi but can't mark its tabs as connected.
; } function ChromiumCard({metadata, version}) { const file = (metadata && metadata.files && metadata.files['wrolpi-chrome.zip']) || {}; const available = !!file.available; return
Chrome / Brave / Edge{version ? ` — v${version}` : ''}

Chromium-based browsers don't allow one-click extension installs from outside the Web Store, so we sideload via the built-in developer flow.

Install steps
  1. Download the .zip above and extract it to a folder you'll keep around.
  2. Open chrome://extensions (or brave://extensions / edge://extensions).
  3. Toggle Developer mode on (top-right).
  4. Click Load unpacked and pick the extracted folder.

The extension stays installed across browser restarts. Don't delete the extracted folder — the browser loads from it directly.

; } function UnknownCard() { return
Unsupported browser

The WROLPi extension supports Chrome, Brave, Edge, and Firefox. Open this page in one of those browsers to install.

; } export function ExtensionPage() { const [metadata, setMetadata] = React.useState(null); const [error, setError] = React.useState(null); const browser = detectBrowser(); React.useEffect(() => { let cancelled = false; fetch('/api/extensions') .then(res => res.json()) .then(body => { if (!cancelled) setMetadata(body); }) .catch(err => { if (!cancelled) setError(String(err)); }); return () => { cancelled = true; }; }, []); if (error) { return {error}; } const versions = (metadata && metadata.versions) || {}; const anyAvailable = metadata && Object.values(metadata.files || {}).some(f => f.available); return
Browser Extension

Install the WROLPi browser extension to send pages, videos, and feeds to this WROLPi from any tab. The extension is open-source and not distributed via official browser stores — it ships with each WROLPi release.

{metadata && !anyAvailable && The extension binaries aren't on this WROLPi yet. They ship with the next release; pull the latest and they'll appear here. } {browser === 'firefox' && } {browser === 'chromium' && } {browser === 'unknown' && }
Both browsers, just in case

You can install for a different browser too — useful if you sync between machines.

{browser !== 'firefox' && } {browser !== 'chromium' && }
; }