Added instructions for windows users to the firefox extension guide

This commit is contained in:
Jeremy Karst 2026-01-07 00:04:52 -05:00
parent 9fd3918a5d
commit 509bcdf51e

View file

@ -39,12 +39,21 @@ The extension name is near the top under <meta content=[EXTENSION_NAME]/>
To solve our particular problem, extract this whole .xpi file into a new folder. We will want to edit the /[Folder Name]/inline/injected.js file. To solve our particular problem, extract this whole .xpi file into a new folder. We will want to edit the /[Folder Name]/inline/injected.js file.
Open a new terminal window here (in the folder with injected.js) and run: Open a new terminal window here (in the folder with injected.js) and...
### For **Linux Users**:
```sh ```sh
sed -i 's/QDe=yte==="client"?window\.crypto\.randomUUID()\.slice(0,8):void 0/QDe=yte==="client"\&\&window.crypto.randomUUID?window.crypto.randomUUID().slice(0,8):void 0/g' injected.js sed -i 's/QDe=yte==="client"?window\.crypto\.randomUUID()\.slice(0,8):void 0/QDe=yte==="client"\&\&window.crypto.randomUUID?window.crypto.randomUUID().slice(0,8):void 0/g' injected.js
``` ```
### For **Windows Users**:
{{< alert "triangle-exclamation" >}}
**Warning!** The powershell command below was converted from the above version by AI and I haven't tested it since I don't have Windows!
{{< /alert >}}
```powershell
(Get-Content injected.js -Raw) -replace 'QDe=yte==="client"\?window\.crypto\.randomUUID\(\)\.slice\(0,8\):void 0','QDe=yte==="client"\&\&window.crypto.randomUUID\?window.crypto.randomUUID().slice(0,8):void 0' | Set-Content injected.js
```
This uses sed to find and replace a string. We are replacing the existing call to window.crypto.randomUUID() to a ternary operator which will check if window.crypto.randomUUID exists and if so use it, if not fall back to void 0 (undefined) which will cause the existing 1Password code to fall back to a counter-based ID instead. This uses sed (or powershell Get-Content) to find and replace a string. We are replacing the existing call to window.crypto.randomUUID() to a ternary operator which will check if window.crypto.randomUUID exists and if so use it, if not fall back to void 0 (undefined) which will cause the existing 1Password code to fall back to a counter-based ID instead.
Note that this sed statement will not work if the 1Password extension significantly changes, so you may need to modify it. Hopefully if the extension changes it means the maintainers have fixed this bug and we don't need to do this in the first place! Note that this sed statement will not work if the 1Password extension significantly changes, so you may need to modify it. Hopefully if the extension changes it means the maintainers have fixed this bug and we don't need to do this in the first place!