npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

browser-interface

v0.0.6

Published

Normalized, cross-browser implementation of the WebExtensions APIs

Downloads

4

Readme

Browser Interface

Important: this package is in early development. It is not ready for production! Do not use it.

WebExtensions allows people to develop browser extensions for multiple browsers. Unfortunately, the methods and syntaxes are not exactly the same in every browser, so that requires some tweaking. This package aims to solve this problem by providing a single syntax for all browsers. It uses the methods and syntax described on the MDN website, and it is compatible with Google Chrome and Mozilla Firefox. Not tested yet in Microsoft Edge.

Installation

Using npm:

npm install --save browser-interface

In Node.js:

import BrowserInterface from "browser-interface";

// Create a driver and pass it the window Object
const driver = new BrowserInterface(window);

// Use it in all browsers
driver.webRequest.onBeforeRequest.addListener(
  req => {
    console.log(req);
  },
  { urls: ["<all_urls>"] }
);

API coverage

This project is still in progress. Here are the different WebExtensions APIs supported at this time.

webRequest

| Property | Status | Chrome | Firefox | Edge | | -------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------ | ------------------ | --------------- | | onBeforeRedirect | Complete | :grey_question: | :grey_question: | :grey_question: | | onBeforeRequest | Complete | :heavy_check_mark: | :heavy_check_mark: | :grey_question: | | onBeforeSendHeaders | Complete | :heavy_check_mark: | :heavy_check_mark: | :grey_question: | | onCompleted | Complete | :heavy_check_mark: | :heavy_check_mark: | :grey_question: | | onErrorOccurred | Complete | :grey_question: | :grey_question: | :grey_question: | | onHeadersReceived | Complete | :heavy_check_mark: | :heavy_check_mark: | :grey_question: | | onResponseStarted | Complete | :heavy_check_mark: | :heavy_check_mark: | :grey_question: | | onSendHeaders | Complete | :heavy_check_mark: | :heavy_check_mark: | :grey_question: |

tabs

| Property | Status | Chrome | Firefox | Edge | | -------------------------------------------------------------------------------------------------------- | -------- | ------------------ | ------------------ | ------------------------ | | onActivated | Complete | :heavy_check_mark: | :heavy_check_mark: | :grey_question: | | onAttached | Complete | :heavy_check_mark: | :heavy_check_mark: | :grey_question: | | onCreated | Complete | :heavy_check_mark: | :heavy_check_mark: | :grey_question: | | onDetached | Complete | :heavy_check_mark: | :heavy_check_mark: | :grey_question: | | onHighlighted | Complete | :heavy_check_mark: | :heavy_check_mark: | :heavy_multiplication_x: | | onMoved | Complete | :heavy_check_mark: | :heavy_check_mark: | :heavy_multiplication_x: | | onRemoved | Complete | :heavy_check_mark: | :heavy_check_mark: | :grey_question: | | onUpdated | Complete | :heavy_check_mark: | :heavy_check_mark: | :grey_question: | | sendMessage | Complete | :grey_question: | :grey_question: | :grey_question: | | query | Complete | :heavy_check_mark: | :grey_question: | :grey_question: | | create | Complete | :grey_question: | :grey_question: | :grey_question: | | remove | Complete | :grey_question: | :grey_question: | :grey_question: | | update | Complete | :grey_question: | :grey_question: | :grey_question: | | get | Complete | :grey_question: | :grey_question: | :grey_question: | | getCurrent | Complete | :grey_question: | :grey_question: | :grey_question: |

storage

| Property | Status | Chrome | Firefox | Edge | | ------------------------------------------------------------------------------------ | -------- | ------------------ | --------------- | --------------- | | sync | Complete | :heavy_check_mark: | :grey_question: | :grey_question: | | local | Complete | :heavy_check_mark: | :grey_question: | :grey_question: |

browserAction

| Property | Status | Chrome | Firefox | Edge | | ------------------------------------------------------------------------------------------------------- | -------- | ------------------ | --------------- | --------------- | | enable | Complete | :grey_question: | :grey_question: | :grey_question: | | disable | Complete | :grey_question: | :grey_question: | :grey_question: | | setIcon | Complete | :heavy_check_mark: | :grey_question: | :grey_question: | | setPopup | Complete | :grey_question: | :grey_question: | :grey_question: | | setTitle | Complete | :grey_question: | :grey_question: | :grey_question: |

runtime

| Property | Status | Chrome | Firefox | Edge | | ------------------------------------------------------------------------------------------------------------ | -------- | ------------------ | --------------- | --------------- | | getBackgroundPage | Complete | :heavy_check_mark: | :grey_question: | :grey_question: | | onMessage | Complete | :heavy_check_mark: | :grey_question: | :grey_question: | | sendMessage | Complete | :heavy_check_mark: | :grey_question: | :grey_question: |