extend-chrome / events-rxjs

RxJS Observables for Chrome API events
MIT License
12 stars 1 forks source link

@extend-chrome/events-rxjs logo

@extend-chrome/events-rxjs

[![npm (scoped)](https://img.shields.io/npm/v/@extend-chrome/events-rxjs.svg)](https://www.npmjs.com/package/@extend-chrome/events-rxjs) [![GitHub last commit](https://img.shields.io/github/last-commit/extend-chrome/events-rxjs.svg)](https://github.com/extend-chrome/events-rxjs) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE) [![TypeScript Declarations Included](https://img.shields.io/badge/types-TypeScript-informational)](#typescript)
[![ko-fi](https://img.shields.io/badge/Buy%20us%20a%20tea-ko--fi-29ABE0)](https://ko-fi.com/jacksteam) [![Chrome Extension Tutorials on YouTube](https://img.shields.io/badge/Chrome%20Extension%20Tutorials-YouTube-c4302b.svg)](https://www.youtube.com/channel/UCVj3dGw75v8aHFYD6CL1tFg)

RxJS Observables for Chrome API events

Table of Contents

Getting started

You will need to use a bundler like Rollup, Parcel, or Webpack to include this library in the build of Chrome extension.

See rollup-plugin-chrome-extension for an easy way use Rollup to build your Chrome extension!

Installation

npm i @extend-chrome/events-rxjs

Usage

import { contextMenus } from '@extend-chrome/events-rxjs'

contextMenus.clickStream.subscribe((clickEvent) => {
  console.log('click', clickEvent)
})