import React from "react"; import {Button, Header, Icon, Segment} from "../Theme"; import {Input, Message} from "semantic-ui-react"; // 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 detectBrowser() { if (typeof navigator === 'undefined') return 'unknown'; const ua = navigator.userAgent || ''; // Order matters: Edge / Brave / Opera all include 'Chrome' in their UA. if (ua.includes('Firefox')) return 'firefox'; if (ua.includes('Edg/')) return 'chromium'; if (ua.includes('OPR/') || ua.includes('Opera')) return 'chromium'; if (ua.includes('Chrome')) return 'chromium'; return 'unknown'; } 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.

} />
; } 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.