Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
CommonJS modules for developing Chrome Extensions
JavaScript
tag: v0.0.2

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples/basic
lib
.gitignore
.npmignore
LICENSE.md
README.md
index.js
package.json

README.md

chrx

chrx is a collection of CommonJS modules for developing Chrome Extensions. The chrome.* APIs provided in Chrome are powerful, but their complexity can make simple tasks rather difficult. This project is an attempt to collect some common abstractions and distribute them via npm.

API

tabs

window

tabs

getActive([options][, callback])

Gets the active tab in the active window.

chrx.tabs.getActive(function(err, tab){})

options

  • protocol

executeScripts(options[, callback])

Executes content scripts in a tab.

chrx.tabs.executeScripts({
    tab: tab,
    scripts: ['underscore.js', 'jquery.js']
}, function(err, tab){})

options

  • tab (required)
  • scripts (required)
  • runAt

executeScriptsInActive(options[, callback])

Executes content scripts in the active tab.

chrx.tabs.executeScriptsInActive({
    scripts: ['underscore.js', 'jquery.js']
}, function(err, tab){})

options

  • scripts (required)
  • runAt

getActive([callback])

Gets the active window.

chrx.window.getActive(function(err, win){})

License

MIT License, see LICENSE for details.

Something went wrong with that request. Please try again.