Skip to content
This repository has been archived by the owner on Oct 23, 2019. It is now read-only.

jrhawley/PubPeerEdge

 
 

Repository files navigation

Pubpeer for Microsoft Edge

Based on PubPeer extension for Chrome and Firefox, with updates from Microsoft Edge Extension Toolkit

Installation

To use this unsigned extension as is, please do the following:

  1. 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".
  2. Load extension into Edge: ... > Extensions > Load Extension, and browse to this repo clone

Packaging this application for the Microsoft Store

To convert this code into an AppX package that can be submitted to the Microsoft Store, follow these steps from this Microsoft guide:

  1. [Use manifoldjs] to create the packaged verion
    cd ..
    
    # 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\
  2. Manually edit AppXManifest.xml In PubPeer\edgeextension\manifest\appxmanifest.xml, edit the corresponding entries as per this article
  3. 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.

Signing AppX package for installation

This is for testing your AppX package before submission to the Microsoft Store. I'm following

  1. 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"
  2. Export the certificate
    $pwd = ConvertTo-SecureString -String <Your Password> -Force -AsPlainText 
    Export-PfxCertificate -cert "Cert:\LocalMachine\My\<Certificate Thumbprint>" -FilePath <FilePath>.pfx -Password $pwd
  3. 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
  4. Trust AppX certificate on local machine
    1. Right-Click > Properties on the AppX package.
    2. Digital Signatures Tab, click on signature, click Details button
    3. View Certificate
    4. Install Certificate
    5. Local Machine, Next, Place all certificates in the following store: "Trusted Root Certificaiton Authorities"
    6. Repeat the above steps with the "Trusted People" store
  5. Install AppX package by double-clicking on it

After testing

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

About

PubPeer extension for Microsoft Edge

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%