Chrome Extension sample from Google's Getting Started guide.
Documentation here.
This version of the code is as rewriting of the original Google example using Kotlin. Code is as close as possible as the original code. Original comments are kept in the equivalent place.
Original version in JavaScript can be seen here.
This project uses gradle. To build it, execute the following:
gradlew clean assemble
Unbundled extension will be generated inside build/extension
.
To install in Chrome:
- Go to Extensions
- Enable "Developer Mode"
- Click on "Load unpacked extension..."
- Select the folder
${project}/build/extension
and open it.
If changes are made and the extension is recompiled, make sure to update the extension:
- Go to Extensions
- Make sure "Developer Mode" is enabled
- Click on "Update extensions now"
Make sure to check Google documentation for more details.
Upon installation a a new extension is added to Chrome with the icon
Clicking the icon will open a small popup that will allow changing active page background color.
Check Google's Getting started guide for more details.