# Firefox Compatibility Changes

This Firefox version was created from the Chrome extension in `ozhovnuvatyi/sony-pde-token-chrome-ext/`

## Changes Made

### 1. manifest.json
- **Added** `browser_specific_settings` with gecko ID and minimum Firefox version (109.0)
- **Changed** extension name to "Sony PDE Helper (Firefox)" to distinguish from Chrome version
- **Changed** background script from `service_worker` to `scripts` array (Firefox MV3 requirement)
- **Added** `type: "module"` for ES module support in background scripts

### 2. constants.js
- **Changed** from standard constant declaration to ES module export
- **Removed** CommonJS module.exports fallback
- Now uses `export const CONSTANTS = {...}`

### 3. background.js
- **Changed** from `importScripts('constants.js')` to `import { CONSTANTS } from './constants.js'`
- Uses ES6 module syntax (required for Firefox MV3)

### 4. README.md
- Updated with Firefox-specific installation instructions
- Added notes about temporary vs permanent installation
- Added Firefox compatibility information

## What Stayed the Same

All core functionality remains identical:
- ✅ Token extraction and validation
- ✅ Identity UUID retrieval
- ✅ Email extraction
- ✅ Datadog RUM link generation
- ✅ All UI and styling
- ✅ webRequest API usage
- ✅ clipboard operations
- ✅ scripting API usage

## Testing Checklist

- [ ] Extension loads in Firefox (about:debugging)
- [ ] Popup displays correctly
- [ ] Token extraction works
- [ ] Token expiration validation works
- [ ] Identity UUID extraction works
- [ ] Email extraction works
- [ ] Datadog RUM link works
- [ ] All buttons show correct status messages
- [ ] Works on all supported domains

## Known Limitations

- Firefox requires extensions to be signed for permanent installation
- Temporary add-ons are removed when Firefox restarts
- For permanent use, consider Firefox Developer Edition or submit for signing
