PWAsForFirefox Documentation

repository·main·Indexed 25 days ago

https://github.com/filips123/pwasforfirefox

A toolset to enable Progressive Web App (PWA) functionality in Mozilla Firefox. It consists of a browser extension, a Rust-based native program for OS-level tasks and CLI management, and UserChrome modifications to provide a standalone app experience with isolated profiles, dedicated taskbar icons, and hidden browser UI.

Tokens
18.1K
Snippets
19
Records
124
Agent score
84%

What's inside PWAsForFirefox

  1. Overview of PWAs for Firefox features

    main

    PWAs for Firefox provides a way to experience Progressive Web Apps as standalone system applications in Mozilla Firefox.

    Key Features:

    • Standalone Experience: PWAs run in isolated Firefox profiles with no tabs or address bars, providing a native app-like feel.
    • System Integration: Installed PWAs have their own taskbar icons and start/app menu entries.
    • Management Tools: Includes a command-line tool and a browser extension for installation and management.
    • Compatibility: Supports all Firefox addons/extensions and built-in features. It allows installing any website as a PWA.
    • Automation: Supports automatic (user-triggered) installation and patching of installation files and profiles.
  2. Overview of PWAsForFirefox Native

    main

    The native component is written in Rust and provides functionality that the browser extension cannot perform alone. Its primary responsibilities include:

    • Installing the Firefox runtime.
    • Patching Firefox with chrome modifications.
    • Installing and launching PWA sites.
    • Providing browser chrome (UI) modifications (via JS and CSS) to hide tabs/address bars and handle web app scopes for a standalone experience.

    It can be controlled via the firefoxpwa console program or through the browser extension using the native messaging protocol.

  3. Overview of Progressive Web Apps for Firefox

    main

    Progressive Web Apps for Firefox is a toolset designed to allow websites to be installed and used as standalone system applications (Site Specific Browsers) within Mozilla Firefox. Since Firefox does not natively support installing PWAs as standalone apps, this project provides a custom modified Firefox runtime, a command-line tool, and a browser extension to manage them.

    Key capabilities include:

    • Standalone Experience: Installed PWAs run in their own windows without tabs or address bars, featuring their own taskbar icons and start/app menu entries.
    • Isolation: PWAs use isolated Firefox installations and profiles to keep them separate from your main browser data.
    • Full Support: Supports all Firefox addons, extensions, and built-in features.
    • Management: Use a command-line tool or the browser extension to install, manage, and run PWAs.
  4. Understand the architecture of Progressive Web Apps for Firefox

    main

    The project is composed of three integrated components that work together to enable PWA functionality in Firefox:

    1. Browser Extension: The primary user interface for installing, editing, and removing sites and profiles. It uses the Native Messaging API to communicate with the native program, bypassing the security limitations of standard web extensions.
    2. Native Program: A Rust-based application that performs OS-level tasks. It handles Firefox runtime installation, applies UserChrome modifications, manages site installations, applies system integration, and launches web apps. It also provides a CLI for users who prefer command-line interaction over the GUI.
    3. UserChrome Modifications: Low-level JavaScript modifications (via UserChromeJS / Autoconfig Startup Scripting) that alter the Firefox UI. These modifications hide the address bar and tabs, reposition browser buttons, and provide specialized widgets to create an app-like experience.
  5. Available features in Progressive Web Apps for Firefox

    main

    The project provides the following capabilities for managing and running PWAs in Firefox:

    • Management Tools: A command-line tool for installation, management, and execution, plus a Firefox extension for managing PWAs and profiles directly from the browser.
    • Isolation: PWAs run in isolated Firefox installations and profiles.
    • App-like Experience: Installed PWAs feature their own start/app menu entries, taskbar icons, and dedicated windows without tabs or address bars.
    • Compatibility: Supports installing any website as a PWA, uses all Firefox addons/extensions, and includes all built-in Firefox features.
    • Maintenance: Supports automatic (user-triggered) installation and patching of installation files and profiles.
  6. Understand the purpose of PWAsForFirefox

    main

    PWAsForFirefox provides a way to install websites as standalone system apps (Site Specific Browsers) in Firefox, a feature not natively supported by Firefox. It achieves this by creating a custom modified Firefox runtime, a console tool, and a browser extension to manage and use these apps.

    Key advantages over Chromium-based PWAs include:

    • Separate Profiles: Allows using different accounts for the same web app or extra customization.
    • Advanced Customization: Supports customizing browser toolbars with widgets, different settings per web app, and installing additional addons.
    • Desktop Integration: Better visual integration and the ability to use CSS to match the host platform's look.
    • Browser Diversity: Provides a Firefox-based alternative to the dominant Blink/WebKit runtimes.
  7. Understand the Extension Privacy Policy

    main

    When initiating a web app installation, the extension exchanges specific data with the native program to correctly obtain and parse the Web Application Manifest.

    Data exchanged includes:

    • Current website URL
    • Manifest URL
    • Other PWA details

    Data handling:

    • Data is stored locally on your computer for the duration that the web app is installed.
    • No personal data leaves your computer or is sent to third parties.
  8. Getting started with PWAsForFirefox

    main

    To use PWAsForFirefox, follow these steps:

    1. Install the Browser Extension: Install the PWA for Firefox extension from the Firefox Add-ons store.
    2. Follow In-Browser Instructions: Once the extension is installed, follow the setup instructions provided directly within the browser.
    3. Check Requirements: For detailed system requirements and setup steps, refer to the installation page.
    4. Manage PWAs: Use the extension or the provided command-line tool to install and run websites as standalone apps.
  9. Apply custom JS to web apps

    main

    To load custom JS (UserChromeJS) into a web app profile:

    1. Locate the web app profile in the profiles directory.
    2. Create a chrome directory inside the profile directory.
    3. Create a user directory inside the chrome directory.
    4. Create a boot.sys.mjs file inside the user directory.
    5. Copy your JS into the correct file (depending on the module format).
    6. Relaunch the web app.

    Warning: Custom JS is extremely powerful and can access user data or run arbitrary programs. Only use scripts from trusted sources.