GithubHelp home page GithubHelp logo

kmponis / chrome-firefox-extension-kotlin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rivasdiaz/helloworld-chrome-extension-kotlin

0.0 0.0 0.0 86 KB

Simple Chrome/firefox Extension in Kotlin

License: Apache License 2.0

Kotlin 93.13% HTML 6.87%

chrome-firefox-extension-kotlin's Introduction

Getting started sample Google Chrome / Mozilla Firefox extension

Based on 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. The API has been extended using Kotlin Coroutines. The extension code has been modified to use coroutines APIs. The API was converted to use Browser Extensions W3C proposed standard. Original comments have been kept at the closest place of the original code.

Previous versions of the extension
  • Original version in JavaScript here.
  • Initial rewrite in Kotlin here.
  • Extension with Kotlin Coroutines only for Chrome here.
Medium articles

Please check this series in Medium that describe this project:

  1. Writing a Chrome extension in Kotlin
  2. Writing a Chrome extension in Kotlin — Using Coroutines
  3. Writing a Chrome extension in Kotlin — Supporting Firefox and Chrome
Building

This project uses gradle. To build it, execute the following:

gradlew clean assemble

Unbundled extension will be generated inside build/extension. This folder can be used to install in Chrome.

Zipped extension will be generated inside build/distributions. The zip generated inside that folder can be used to install in Firefox.

Installing the extension
Google Chrome
  1. Go to Extensions
  2. Enable "Developer Mode"
  3. Click on "Load unpacked extension..."
  4. Select the folder ${project}/build/extension and open it.

If changes are made and the extension is recompiled, make sure to update the extension:

  1. Go to Extensions
  2. Make sure "Developer Mode" is enabled
  3. Click on "Update extensions now"

Make sure to check Google documentation for more details.

Mozilla Firefox

The extension needs to be uploaded to Mozilla Add-ons website for the extension to work in Firefox.

Please follow instructions here.

Testing the extension

Upon installation a a new extension is added to Chrome/Firefox with the icon hello

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.

chrome-firefox-extension-kotlin's People

Contributors

rivasdiaz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.