diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8ee32f3..fd09d86 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,8 +1,7 @@ name: Test on: - - pull_request - - push + workflow_dispatch: null jobs: security: diff --git a/README.md b/README.md index 19368e0..fb251cc 100644 --- a/README.md +++ b/README.md @@ -1,86 +1,37 @@ -# browser-extension-template +# Auto-archiver API -[link-rgh]: https://github.com/sindresorhus/refined-github -[link-ngh]: https://github.com/sindresorhus/notifier-for-github -[link-hfog]: https://github.com/sindresorhus/hide-files-on-github -[link-tsconfig]: https://github.com/sindresorhus/tsconfig -[link-options-sync]: https://github.com/fregante/webext-options-sync -[link-cws-keys]: https://github.com/fregante/chrome-webstore-upload/blob/main/How%20to%20generate%20Google%20API%20keys.md -[link-amo-keys]: https://addons.mozilla.org/en-US/developers/addon/api/key +Chromium browser extension that connects to [bellingcat/auto-archiver-api](https://github.com/bellingcat/auto-archiver-api) essentially providing an easy UI to [Belligncat's auto-archiver](https://github.com/bellingcat/auto-archiver). -> Cross-browser extension boilerplate - barebones template with Parcel 2, options handler and auto-publishing. +> Beta version: currently only allowed user emails can use it. -Screenshot of extension options: - -![Sample extension options output](media/previewer.png) - -## Features - -- Uses Manifest v3 ([not yet compatible with Firefox](https://bugzilla.mozilla.org/show_bug.cgi?id=1578284)) -- Use npm dependencies thanks to Parcel 2. -- [Auto-syncing options](#auto-syncing-options). -- [Auto-publishing](#publishing) with auto-versioning and support for manual releases. - -## Getting started - -### 1️⃣ Create your own copy - -1. Click [Use this template](https://github.com/fregante/browser-extension-template/generate) to make a copy of your own. 😉 - -Note: When you create a repository from the template, the [Template Cleanup](.github/workflows/template-cleanup.yml) workflow will be triggered to delete and edit template-specific resources. Wait a moment until the workflow finishes (you will see a commit pushed with 'Template cleanup' message). +![Sample extension](media/screenshot-01.png) ### 🛠 Build locally -1. Checkout the copied repository to your local machine eg. with `git clone https://github.com/my-username/my-awesome-extension/` +1. Checkout the copied repository to your local machine eg. with `git clone https://github.com/bellingcat/auto-archiver-extension` 1. Run `npm install` to install all required dependencies 1. Run `npm run build` -The build step will create the `distribution` folder, this folder will contain the generated extension. +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](https://extensionworkshop.com/documentation/develop/getting-started-with-web-ext/) is recommended for automatic reloading and running in a dedicated browser instance. Alternatively you can load the extension manually (see below). +Using [web-ext](https://extensionworkshop.com/documentation/develop/getting-started-with-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 1. Run `npm install --global web-ext` (only only for the first time) 1. In another terminal, run `web-ext run -t chromium` 1. Check that the extension is loaded by opening the extension options ([in Firefox](media/extension_options_firefox.png) or [in Chrome](media/extension_options_chrome.png)). + +> You need to connect to a backend of the [bellingcat/auto-archiver-api](https://github.com/bellingcat/auto-archiver-api) make sure to setup that too. + #### Manually You can also [load the extension manually in Chrome](https://www.smashingmagazine.com/2017/04/browser-extension-edge-chrome-firefox-opera-brave-vivaldi/#google-chrome-opera-vivaldi) or [Firefox](https://www.smashingmagazine.com/2017/04/browser-extension-edge-chrome-firefox-opera-brave-vivaldi/#mozilla-firefox). -### ✏️ Make the first change -1. For example, edit source\manifest.json to `"name": "My Awesome Extension",` -1. Go back to your browser, reload and see the change take effect - -Note: Firefox will automatically reload content scripts when the extension is updated, Chrome requires you to reload the page to reload the content scripts. - -### 📕 Read the documentation - -Here are some websites you should refer to: - -- [Parcel’s Web Extension transformer documentation](https://parceljs.org/recipes/web-extension/) -- [Chrome extensions’ API list](https://developer.chrome.com/docs/extensions/reference/) -- A lot more links in my [Awesome WebExtensions](https://github.com/fregante/Awesome-WebExtensions) list - -## Configuration - -The extension doesn't target any specific ECMAScript environment or provide any transpiling by default. The extensions output will be the same ECMAScript you write. This allows us to always target the latest browser version, which is a good practice you should be following. - -### Parcel 2 - -Being based on Parcel 2 and its [WebExtension transformer](https://parceljs.org/recipes/web-extension/), you get all the good parts: - -- Browserlist-based code transpiling (which defaults to just the latest Chrome and Firefox versions) -- Automatically picks up any new file specified in `manifest.json` - -### Auto-syncing options - -Options are managed by [fregante/webext-options-sync][link-options-sync], which auto-saves and auto-restores the options form, applies defaults and runs migrations. - -### Publishing +### 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: @@ -100,18 +51,4 @@ The GitHub Actions workflow will: Thanks to the included [GitHub Action Workflows](.github/workflows), if you set up those secrets in the repo's Settings, the deployment will automatically happen: - on a schedule, by default [every week](.github/workflows/release.yml) (but only if there are any new commits in the last tag) -- manually, by clicking ["Run workflow"](https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/) in the Actions tab. - -## Credits - -Extension icon made by [Freepik](https://www.freepik.com) from [www.flaticon.com](https://www.flaticon.com) is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0). - -## Extensions created using this template - -- [notlmn/copy-as-markdown](https://github.com/notlmn/copy-as-markdown) - Browser extension to copy hyperlinks, images, and selected text as Markdown. - -## License - -This browser extension template is released under [CC0](#license) and mentioned below. There is no `license` file included in here, but when you clone this template, you should include your own license file for the specific license you choose to use. - -[![CC0](https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/cc-zero.svg)](https://creativecommons.org/publicdomain/zero/1.0/) +- manually, by clicking ["Run workflow"](https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/) in the Actions tab. \ No newline at end of file diff --git a/source/manifest.json b/source/manifest.json index 9ca2b16..be23918 100644 --- a/source/manifest.json +++ b/source/manifest.json @@ -1,6 +1,6 @@ { "name": "Auto-archiver extension", - "version": "0.0.5", + "version": "0.0.6", "description": "A gateway to effective archiving of online content, including behind private platforms. ", "homepage_url": "https://github.com/bellingcat/auto-archiver-extension", "manifest_version": 3,