Skip to content

A simple browser extension to fix Reddit chats for mobile users

License

Notifications You must be signed in to change notification settings

nuckle/reddit-chat-mobile-fix

Repository files navigation

Reddit Mobile Chat Fix

Just a glorified version of my user script to make reddit chats usable in browser.

As a bonus, now you don't need to switch your user agent just to visit the site on mobile!

Preview

Without the extension Without the extension Without the extension
With the extension With the extension With the extension

Download

Firefox

Download

Or on a release page

Features

  • DMs support
  • Threads support
  • Built-in user-agent spoofer
  • Basic chat functionality support

Usage Notes

The extension manifest is defined in src/manifest.js and used by @samrum/vite-plugin-web-extension in the vite config.

Background, content scripts, options, and popup entry points exist in the src/entries directory.

To switch between Manifest V2 and Manifest V3 builds, use the MANIFEST_VERSION environment variable defined in .env

HMR during development in Manifest V3 requires Chromium version >= 110.0.5480.0.

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

You can customize your build via .env file

MANIFEST_VERSION=3
FIREFOX_BUILD=0
  • MANIFEST_VERSION - manifest version you want to use (2 or 3)
  • FIREFOX_BUILD - is the build for Firefox (0 - no, 1 - yes)

Commands

Build

Development, HMR

Hot Module Reloading is used to load changes inline without requiring extension rebuilds and extension/page reloads Currently only works in Chromium based browsers.

npm run dev

Development, Watch

Rebuilds extension on file changes. Requires a reload of the extension (and page reload if using content scripts)

npm run watch

Production

Minifies and optimizes extension build

npm run build

Browser-specific builds

npm run build:chrome
# or
npm run build:firefox

The build will be at dist/ directory

Note: Chrome build will use v3 manifest and Firefox build will use v2 manifest. Also I added a random id for Firefox build to be able to install it without any additional steps.

Load extension in browser

Loads the contents of the dist directory into the specified browser

npm run serve:chrome
npm run serve:firefox

License

This project uses AGPL license: License