zotero / zotero-connectors

Chrome, Firefox, Edge, and Safari extensions for Zotero
https://www.zotero.org/download/connectors
Other
530 stars 124 forks source link

Add Chrome Web Store public key to manifest.json #456

Closed AbeJellinek closed 10 months ago

AbeJellinek commented 10 months ago

See https://developer.chrome.com/docs/extensions/reference/manifest/key#keep-consistent-id

With the key added to manifest.json, the extension's ID will be the same when loaded unpacked for debugging as it is when downloaded from the Chrome Web Store. That eliminates the need for all the weirdness that we need to do to find the extension ID when we test translators using Selenium (which is the most commonly broken part of our translator tester).

(key is what you get when you run chrome.runtime.getManifest().key from the extension when it's installed from the Chrome Web Store. Here we hardcode it for non-Chrome Web Store installs.)

adomasven commented 9 months ago

This makes it so the dev extension unloads upon Chrome restart and messes with Chrome in various ways, so I'd rather this was specified in the build config.sh file. I am going to make that change and submit a PR here, you should adjust the translator repo CI at that point.

AbeJellinek commented 9 months ago

OK, sounds good.