Skip to content

ktauchathuranga/sharetext-firefox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ShareText Firefox Extension

ShareText is a Firefox extension that allows you to quickly generate QR codes for selected text or URLs from your browser, making it easy to share content with your mobile devices.

Features

  • πŸ“± Generate QR codes from selected text with a right-click
  • πŸ”— Generate QR codes from right-clicked URL links
  • πŸ”„ Automatically handles special characters and encoding
  • ⚑ QR codes are generated instantly in a popup window
  • 🎨 Clean, minimalist interface
  • πŸ”’ Privacy-focused - all processing happens locally in your browser

Screenshots

Screenshot From 2025-06-03 11-48-26 Screenshot From 2025-06-03 11-46-13 Screenshot From 2025-06-03 11-45-06

QR code generation in action - right-click any selected text or link

Installation

From Firefox Add-ons (AMO)

Manual Installation (For Development/Testing)

  1. Download the extension:

    • Clone this repository: git clone https://github.com/ktauchathuranga/sharetext-firefox.git
    • Or download as ZIP and extract
  2. Load in Firefox:

    • Open Firefox
    • Navigate to about:debugging
    • Click "This Firefox" in the sidebar
    • Click "Load Temporary Add-on..."
    • Select the manifest.json file from the extension folder
  3. For permanent installation:

    • Package as .xpi file or install from AMO

How to Use

For Text

  1. Select any text on a webpage
  2. Right-click on the selected text
  3. Choose "Share this text as QR code" from the context menu
  4. A popup window will open with the generated QR code
  5. Scan with your phone to instantly access the text

For Links

  1. Right-click on any link on a webpage
  2. Choose "Share this link as QR code" from the context menu
  3. A popup window will open with the QR code for the URL
  4. Scan with your phone to open the link on your mobile device

Use Cases

  • πŸ“² Share long URLs with your phone quickly
  • πŸ“ Transfer text snippets between devices
  • πŸ”— Share links during presentations
  • πŸ“± Quick mobile access to desktop content
  • 🎯 Share content without typing on mobile

File Structure

sharetext-firefox/
β”œβ”€β”€ manifest.json          # Extension manifest
β”œβ”€β”€ background.js          # Background script for context menus
β”œβ”€β”€ popup.html            # QR code display page
β”œβ”€β”€ popup.js              # QR code generation logic
β”œβ”€β”€ icon.png              # Extension icon
β”œβ”€β”€ libs/
β”‚   β”œβ”€β”€ qrcode.js         # QR code library
β”‚   └── qrcode.min.js     # Minified QR code library
└── README.md             # This file

Technical Details

  • Manifest Version: 2 (Firefox standard)
  • Permissions: contextMenus, activeTab
  • Minimum Firefox Version: 57.0
  • QR Code Library: qrcode.js
  • No external dependencies - works entirely offline

Privacy

  • βœ… All QR code generation happens locally in your browser
  • βœ… No data is sent to external servers
  • βœ… No tracking or analytics
  • βœ… No internet connection required for QR code generation
  • βœ… Only requires minimal permissions (contextMenus, activeTab)

Development

Prerequisites

  • Firefox Developer Edition (recommended) or regular Firefox
  • Basic knowledge of WebExtensions API

Building

  1. Clone the repository
  2. Make your changes
  3. Test using about:debugging
  4. Package using web-ext build (if you have web-ext installed)

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

Browser Compatibility

  • βœ… Firefox 57+ (Primary target)
  • ⚠️ Chrome version available separately

Troubleshooting

QR Code Not Generating

  • Make sure you have selected text or right-clicked on a link
  • Check browser console for errors (F12 β†’ Console)

Context Menu Not Appearing

  • Ensure the extension is properly loaded
  • Try reloading the webpage
  • Check if the extension is enabled in about:addons

Extension Not Loading

  • Verify all files are present
  • Check manifest.json syntax
  • Look for errors in about:debugging

License

This project is open-source and available under the MIT License.

Support

Related Projects


Made with ❀️ for the Firefox community

If you find this extension useful, please consider giving it a ⭐ on GitHub or leaving a review on the Firefox Add-ons Store!

About

Firefox extension that allows you to quickly generate QR codes for selected text or URLs from your browser.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published