Based on PubPeer extension for Chrome and Firefox, with updates from Microsoft Edge Extension Toolkit
To use this unsigned extension as is, please do the following:
- Ensure that apps can be sideloaded in Edge. Go to Settings > Update & security > For developers, and select "Sideload apps" or "Developer mode". Then, go to Edge > about:flags, and check "Enable extension developer features".
- Load extension into Edge: ... > Extensions > Load Extension, and browse to this repo clone
To convert this code into an AppX package that can be submitted to the Microsoft Store, follow these steps from this Microsoft guide:
- [Use
manifoldjs
] to create the packaged verioncd .. # create initial package manifoldjs -l debug -p edgeextension -f edgeextension -m PubPeerEdge\manifest.json # create final package manifoldjs -l debug -p edgeextension package <EXTENSION NAME>\edgeextension\manifest\
- Manually edit AppXManifest.xml
In
PubPeer\edgeextension\manifest\appxmanifest.xml
, edit the corresponding entries as per this article - Create AppX package
cd "C:\Program Files (x86)\Windows Kits\10\bin\x64" makeappx.exe pack /h SHA256 /d PubPeer\edgeextension\manifest /p PubPeer\edgeextension\edgeExtension.appx
If this extension will then be uploaded to the Microsoft Store, you don't need to go any further, since the store signs and certifies app packages from here.
If you want to test the extension locally, you need to follow the next section.
This is for testing your AppX package before submission to the Microsoft Store. I'm following
- Create a self-signed certificate in PowerShell (admin). See this article from Microsoft.
New-SelfSignedCertificate -Type Custom -Subject <Package/Identity/Publisher from Microsoft Developer Dashboard> -KeyUsage DigitalSignature -FriendlyName <Package/Properties/PublisherDisplayName from Microsoft Developer Dashboard> -CertStoreLocation "Cert:\LocalMachine\My"
- Export the certificate
$pwd = ConvertTo-SecureString -String <Your Password> -Force -AsPlainText Export-PfxCertificate -cert "Cert:\LocalMachine\My\<Certificate Thumbprint>" -FilePath <FilePath>.pfx -Password $pwd
- Sign AppX package using new certificate
See this article from Microsoft.
cd C:\Program Files (x86)\Windows Kits\10\bin\x64 signtool.exe sign /fd SHA256 /a /f <Path to Certificate>.pfx /p <Your Password> PubPeer\edgeextension\edgeExtension.appx
- Trust AppX certificate on local machine
- Right-Click > Properties on the AppX package.
- Digital Signatures Tab, click on signature, click Details button
- View Certificate
- Install Certificate
- Local Machine, Next, Place all certificates in the following store: "Trusted Root Certificaiton Authorities"
- Repeat the above steps with the "Trusted People" store
- Install AppX package by double-clicking on it
To ensure security of your machine, after you finish testing the AppX package, remove the certificate from your computer's store.
Certutil -delStore TrustedPeople <certID>
You can find <certID>
by finding it in the list generated by:
Certutil -store TrustedPeople