Example web browser extension in Scala.
This project uses:
- ScalablyTyped to generate Scala.js interfaces for Web Extension Polyfill, which is a cross-browser polyfill for browser extensions.
- scalajs-react for scala interfaces to React
- scalacss for type-safe CSS in Scala
sbt universal:packageBin
cd plugin/target/universal/
unzip plugin-0.1.0-SNAPSHOT.zip
The extracted plugin-0.1.0-SNAPSHOT
folder can be loaded into chrome via chrome://extensions/
and use Load Unpacked
(ensure developer mode is turned on).
- Fix CI workflow
- Generate index.html dynamically based upon
fastOptJS
vsfullOptJS
. - Split scala-js dependencies into separate
.js
files to improve compilation speed. - Look into unit testing via mockzilla-webextension
- Verify Firefox compatibility
- Add background script example
- Figure out
npm run dev
equivalent workflow - Figure out/understand
asset-manifest.json
usage
Original React
inspiration from Chrome Extension Kit
The scala-js-browser-extension-example project welcomes contributions from anybody wishing to participate. All code or documentation that is provided must be licensed with the same license that scala-js-browser-extension-example is licensed with (Apache 2.0, see LICENCE).
People are expected to follow the Scala Code of Conduct when discussing scala-js-browser-extension-example on GitHub, Gitter channel, or other venues.
Feel free to open an issue if you notice a bug, have an idea for a feature, or have a question about the code. Pull requests are also gladly accepted. For more information, check out the contributor guide.
Copyright 2022 Eric Peters & scala-js-browser-extension-example contributors.
All code in this repository is licensed under the Apache License, Version 2.0. See LICENCE.