A firefox add-on to add checkboxes to recipes and also a wake lock so the screen does not turn of when cooking
- From a JSON file we load suported sites
- Adds checkboxes to all
<li>
elements inside a selector - Adds a checkbox "Check all/ Deselect All" button
- Adds a Wakelock button to prevent screen from turning off when cooking
Create a pull request for new sites or create an issue with what sites you want to be added
To add a new site to this add-on you have to do a few things:
{
"name": "food.com",
"url": "food.com",
"selector": ".ingredient-list"
}
here all available values for this object:
Key | Description | Optional |
---|---|---|
name | The name of the website | false |
url | the url without https:// or www |
false |
selector | a selector that holds the list of ingrediants normally a ul with li children | false |
dontAddWakelock | dont add wakelock this is only used if the site already has that, so you can disable this feature | true |
dontAddCheckboxes | dont add checkboxes this is only used if we want to add wakelock but site already has checkboxes | true |
This add-on works with one JS file for all but we can load custom css files for each site supported. When building we automatically look for that and if the file exists we add it to the add-on
sites/{name}/style.css
{name}
is the name we used in sites.json
- Clone
- Run
pnpm install
to install all required dependencies - Run
pnpx tsx populate.ts
to create themanifest.json
fromsites.json
- Run
pnpm 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
pnpm 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.
- notlmn/copy-as-markdown - Browser extension to copy hyperlinks, images, and selected text as Markdown.