A browser extension to sort references and resize images while working in Word Online.
Browser extension for Firefox & Chrome — sort references A–Z and resize images while working in Microsoft Word Online, SharePoint, and OneDrive.
| Feature | Reliability | How it works |
|---|---|---|
| Paste Mode (References) | ✅ Always works | Paste → Sort → Copy → Paste back in Word |
| Clipboard Sort (References) | ✅ Very reliable | Reads clipboard, sorts, writes back |
| Live Selection (References) | ⚡ Experimental | Reads DOM selection if accessible |
| Image Resizer | ⚠ Limited | Tries to resize accessible DOM images |
Honest note: Word Online renders documents in a protected iframe/canvas layer. Direct DOM access to the document editing area is generally blocked. The extension uses a clipboard-based workflow as the primary path and clearly flags limitations.
Build the extension:
npm install
npm run build
Open Firefox → address bar → about:debugging
Click This Firefox → Load Temporary Add-on…
Navigate to dist/ → select manifest.json
The DocFixer icon appears in the toolbar.
npm run build
cd dist && zip -r ../docfixer-extension.zip .
Then install the .zip via about:addons → gear icon → Install Add-on From File.
Update manifest.json:
"manifest_version": 2 → 3"browser_action" → "action""background": { "scripts": [...] } → "background": { "service_worker": "background/background.js" }"browser_specific_settings"Build: npm run build
Chrome → chrome://extensions → Developer mode ON → Load unpacked → select dist/
Ctrl+C).Ctrl+V to paste the sorted version.Ctrl+C.Ctrl+V.<img> elements on the page and applies CSS sizing.Note: Images rendered inside Word Online’s protected document canvas usually cannot be accessed. Results depend on the page structure.
docfixer-browser-extension/
├── manifest.json
├── package.json
├── tsconfig.json
├── webpack.config.js
├── public/
│ └── icons/
│ ├── icon-16.png
│ ├── icon-32.png
│ ├── icon-48.png
│ └── icon-128.png
├── src/
│ ├── popup/
│ │ ├── popup.html Main popup UI (3 reference modes + image resizer)
│ │ ├── popup.ts All popup logic
│ │ └── popup.css Styles
│ ├── content/
│ │ └── contentScript.ts Injected into Office/SharePoint pages
│ ├── background/
│ │ └── background.ts Minimal event page
│ ├── features/
│ │ ├── referenceSorter.ts Pure sort logic (strips numeric prefixes)
│ │ ├── imageResizer.ts DOM image finder + CSS resizer
│ │ └── wordOnlineDetector.ts Detects if on Word Online
│ └── utils/
│ ├── messaging.ts TypeScript message type contracts
│ ├── validation.ts Input validation
│ └── domHelpers.ts Image collection helpers
└── docs/
└── USER_GUIDE.md
| Layer | Technology |
|---|---|
| Extension APIs | WebExtension (MV2 Firefox, adaptable to MV3 Chrome) |
| Language | TypeScript |
| Bundler | Webpack 5 + ts-loader |
| Cross-browser shim | webextension-polyfill |
| Styling | Plain CSS (no framework) |
No backend, no external API, no database.