Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

then-chrome

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

then-chrome

Promise wrapper for chrome api

  • 0.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-97.86%
Maintainers
1
Weekly downloads
 
Created
Source

then-chrome

Build Status npm version Code Climate

Promise-based chrome api.

usage

var chromeApi = require('then-chrome');

// get tabs list
chromeApi.tabs.query({currentWindow: true})
   .then(console.log); // tabs list

// get all cookies by name   
chromeApi.cookies.getAll({name: 'cookieName'})
   .then(console.log); // cookie list
   
// detect language by tab
chromeApi.tabs.detectLanguage(10)
   .then(console.log); // en
   .catch(console.warn); // catch chrome.runtime.lastError value

Sycn methods are wrapped too

var chromeApi = require('then-chrome');

chromeApi.i18n.getMessage('title')
   .then(console.log); // 'extension title'

install

npm install then-chrome

or

git clone https://github.com/acvetkov/then-chrome.git
cd then-chrome
npm install

build

npm run build

test

npm test

Supported methods

  1. chrome.alarms
  2. chrome.cookies
  3. chrome.bookmarks
  4. chrome.browserAction
  5. chrome.contextMenus
  6. chrome.history
  7. chrome.i18n
  8. chrome.management
  9. chrome.notifications
  10. chrome.pageAction
  11. chrome.permissions
  12. chrome.runtime
  13. chrome.tabs
  14. chrome.topSites
  15. chrome.webNavigation
  16. chrome.windows

Keywords

FAQs

Package last updated on 13 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc