This is an extension for the Gouda api, designed for the myanonmouse website.
Important
Currently, the extension is not published to the extension stores and manual installation is required.
Note
The scripts below are optional, all they do is download the latest extension release zip file, and unzip them to make it easy to install/update the extension.
If you feel uncomfortable running the scripts, you can follow instructions here to manually download the extension.
- Open a terminal window
- Run the commands below
Feel free to inspect the script
iex (iwr 'https://raw.githubusercontent.com/RA341/gouda/refs/heads/release/install_scripts/extension.install.ps1').Content
Feel free to inspect the script
curl -s 'https://raw.githubusercontent.com/RA341/gouda/refs/heads/release/install_scripts/extension.install.sh' | bash
- Download the zip from https://github.com/RA341/gouda/releases/latest
- Unzip the downloaded file, it will contain a single directory named dist.
- Open your browser, in the extensions tab, on the top right side corner enable developer mode
- Next click on the load unpacked button and select the folder you unzipped.
- Next, setup the extension
- Download the zip from https://github.com/RA341/gouda/releases/latest
- Unlike chrome, firefox can load the zip file directly.
- Open firefox and go to the extensions page.
- Click the settings icon here,
- Then click
install addon from file
- Select the zip file and install.
- Next, setup the extension
Important
This only applies to firefox users.
If you are running gouda in a different machine but on the same network, you must use a https domain.
What this means is if you are running gouda in another machine at IP: http://192.168.1.43:9862
,
this address will not work, you must use a domain name: e.g. https://gouda.example.com
(which points to http://192.168.1.43:9862
)
- if you've followed, the instructions above, the extension should now be loaded, with the icon
- Click it, and enter your api instance url and apikey (can be found from the gouda web ui settings page)
- That's all folks!!
- Go to any book release on the site, and you should have this button near the download button.
Note
The dropdown will show an error, if you have not created any categories.
if you do not have categories set them up via the gouda webui.
- Checkout the copied repository to your local machine eg. with
git clone https://github.com/RA341/gouda
- Run
npm install
to install all required dependencies - Run
npm run build
The build step will create the distribution
folder, this folder will contain the generated 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).
- Run
npm run watch
to watch for file changes and build continuously - Run
npm install --global web-ext
(only only for the first time) - In another terminal, run
web-ext run -t chromium
- Check that the extension is loaded by opening the extension options (in Firefox or in Chrome).
You can also load the extension manually in Chrome or Firefox.
Here are some websites you should refer to:
- Parcel’s Web Extension transformer documentation
- Chrome extensions’ API list
- A lot more links in my Awesome WebExtensions list
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.
Being based on Parcel 2 and its WebExtension transformer, 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
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.
It's possible to automatically publish to both the Chrome Web Store and Mozilla Addons at once by adding these secrets on GitHub Actions:
CLIENT_ID
,CLIENT_SECRET
, andREFRESH_TOKEN
from [Google APIs][link-cws-keys].WEB_EXT_API_KEY
, andWEB_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:
- Build the extension
- Create a version number based on the current UTC date time, like
19.6.16
and sets it in the manifest.json - Deploy it to both stores
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.
Extension icon made by Freepik from www.flaticon.com is licensed by CC 3.0 BY.