Skip to content

wboudiche/linshare-firefox-extension

Repository files navigation

LinShare Firefox Extension

A Firefox sidebar extension for LinShare, the open-source secure file sharing platform. Upload, store, and share files directly from your browser.

Features

  • Sidebar panel — access LinShare without leaving your current tab
  • Drag & drop upload — drop files from your computer or drag images/links from web pages
  • Right-click sharing — share any link, image, audio, or video via the context menu
  • Quick share — pin favorite recipients for one-click adding
  • Multi-recipient paste — paste comma/semicolon/newline-separated email lists
  • Dark mode — automatic support via prefers-color-scheme
  • Internationalization — English and French
  • Encrypted credentials — passwords and tokens stored with AES-GCM encryption

Installation

From Firefox Add-ons (AMO)

Coming soon

Manual installation (development)

  1. Clone this repository
  2. Open Firefox and navigate to about:debugging#/runtime/this-firefox
  3. Click Load Temporary Add-on
  4. Select the manifest.json file from the project root
  5. Open the sidebar: View > Sidebar > LinShare

Configuration

  1. Right-click the LinShare icon in the sidebar and select Manage Extension > Preferences
  2. Enter your LinShare server URL (must be HTTPS)
  3. Enter your email and password (or JWT token)
  4. Click Check & Save

Project Structure

linshare-firefox-extension/
├── manifest.json              # Extension manifest (MV2)
├── background.js              # Background script (context menu, sidebar)
├── popup/                     # Sidebar panel UI
├── dialog/                    # Right-click share dialog
├── options/                   # Settings page
├── components/                # Reusable web components
│   ├── file-upload.js         # Drag & drop file upload
│   ├── quota-bar.js           # Storage quota display
│   ├── recipient-input.js     # Email chip input with autocomplete
│   └── share-form.js          # Share form with preferences
├── modules/                   # Core logic
│   ├── linshareAPI.js         # LinShare REST API client
│   ├── profileStorage.js      # Encrypted credential storage
│   ├── routes.js              # API route definitions
│   ├── urlUtils.js            # URL validation (SSRF protection)
│   └── formatUtils.js         # Shared formatting utilities
├── styles/                    # Shared CSS variables and styles
├── _locales/                  # i18n (en, fr)
├── assets/                    # Icons and images
└── test/                      # Playwright E2E tests

Development

Prerequisites

  • Firefox 63+
  • Node.js (for testing)
  • web-ext (optional, for linting/building)

Run with auto-reload

npx web-ext run

Lint

npx web-ext lint

Run tests

npm install
npx playwright test

Build for distribution

npx web-ext build

The .zip file will be in web-ext-artifacts/.

Security

  • Credentials encrypted at rest with AES-GCM + PBKDF2
  • HTTPS enforced for all API calls and resource fetching
  • SSRF protection blocks private IPs, IPv6 local addresses, and localhost
  • No content scripts injected into web pages
  • No external dependencies or CDN resources
  • Content Security Policy: script-src 'self'; object-src 'none'

Related Projects

License

GPL-3.0 — see LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors