- Ever wanted to create a Web-Extension with Kotlin-JS?
- You had no idea where to start or implementation was to difficult?
- Provides: popup,content and background out of the box
- Provides: base module for extension API implementation
- Provides: easy build process
- Uses: Manifest v3
- Uses: Kotlin Gradle
Fork this repository or click Use this template.
Import your new repository into IntelliJ or any other IDE of your choice.
I provided all modules you need out of the box and even some small examples.
Do whatever you want with it.
It's possible that the code were not generated correctly in some cases. Please create an issue if you've found any wrong parameter/return type etc.
Enums will be generated as well, however if any function/event returns an enum like:
browser.runtime.getPlatformInfo()
The enum won't be accessible as such.
Instead, call the toString()
method on it and then create the enum type by this value, e.g.:
browser.runtime.getPlatformInfo().collect {
console.log(it.os == PlatformOs.linux)
console.log(PlatformOs.valueOf(it.os.toString()) == PlatformOs.linux)
}
This will output:
false
true
This is useful e.g. if the API specifications changed.
./gradlew :generate:clean
./gradlew :generate:run
This step is not needed if you've edited resource files only.
./gradlew clean assemble
./gradlew extension
When you face any bugs or problems please open an Issue.
To add functionality fork the project and create a pull request afterwards. You should know how that works if you are a developer :) You can add yourself to the list below if you want then.
Avatar | Contributor |
---|---|
DatLag |
Supporting this project helps to keep it up-to-date. You can donate if you want or contribute to the project as well. This shows that the app is used by people and it's worth to maintain.