Skip to content

bellingcat/auto-archiver-extension

Repository files navigation

Auto Archiver Extension

Chromium browser extension that connects to an API that calls Bellingcat's auto-archiver.

Available on chrome web store

Sample extension

🛠 Build locally

  1. Checkout the copied repository to your local machine eg. with git clone https://github.com/bellingcat/auto-archiver-extension
  2. Run npm install to install all required dependencies
  3. Run npm run build

The build step will create the distribution folder, this folder will contain the generated extension. There's also a distribution.zip file.

🏃 Run the extension

Using web-ext is recommended for automatic reloading and running in a dedicated browser instance. Alternatively you can load the extension manually (see below). The UI is build with vue.js.

  1. Run npm run watch to watch for file changes and build continuously
  2. Run npm install --global web-ext (only only for the first time)
  3. In another terminal, run web-ext run -t chromium
  4. Check that the extension is loaded by opening the extension options.
  5. chrome://identity-internals/ can be useful to debug/revoke local access tokens

Manually

You can also load the extension manually in Chrome or Firefox.

Publishing (TODO)

It's possible to automatically publish to both the Chrome Web Store and Mozilla Addons at once by adding these secrets on GitHub Actions:

  1. CLIENT_ID, CLIENT_SECRET, and REFRESH_TOKEN from [Google APIs][link-cws-keys].
  2. WEB_EXT_API_KEY, and WEB_EXT_API_SECRET from [AMO][link-amo-keys].

Also include EXTENSION_ID in the secrets (how to find it) and add Mozilla’s gecko.id to manifest.json.

The GitHub Actions workflow will:

  1. Build the extension
  2. Create a version number based on the current UTC date time, like 19.6.16 and sets it in the manifest.json
  3. Deploy it to both stores

Auto-publishing

Thanks to the included GitHub Action Workflows, if you set up those secrets in the repo's Settings, the deployment will automatically happen:

  • on a schedule, by default every week (but only if there are any new commits in the last tag)
  • manually, by clicking "Run workflow" in the Actions tab.

Funding

This project is funded by the European Union under contract number: INEA/CEF/ICT/A2020/2381738.

Dit project is gefinancierd door de Europese Unie onder overeenkomstnummer: INEA/CEF/ICT/A2020/2381738.