🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

meteor-chrome-extension-utils

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

meteor-chrome-extension-utils

Lets you call extension methods from the meteor client

0.0.2
latest
Source
npm
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

chrome-extension-utils

This package bundles useful utils for working with a chrome extension.

Install

This package has two parts.

  • meteor package
  • chrome extension package

Install Meteor package

meteor add handtrix:chrome-extension-utils

And add your extension id to your Meteor.settings

{
  "public": {
    "chromeExtension": {
      "id": "fclmgmkhbncahpifpidimcjhbfaaiplh"
    }
}

Install Chrome Extension Package

In your chrome extension install this package via:

NPM

npm install --save meteor-chrome-extension-utils

Bower

bower install --save meteor-chrome-extension-utils

Manually

Include the file manually.

Features

Check if extension is installed

meteor client

ChromeExtension.isInstalled(function(isInstalled){

});

Check if the browser supports chrome extensions

meteor client

ChromeExtension.isBrowserSupported;

Trigger inline install

meteor client

ChromeExtension.install(function(err, success){

});

Get the webstore url

meteor client

ChromeExtension.getWebstoreUrl();

Navigate to webstore item

meteor client

ChromeExtension.navigateToWebstore;

Call methods in a chrome extension.

meteor client

ChromeExtension.call('foo', 'param1', 'param2', function(result){
  console.log(result);
});

chrome extension

ChromeExtension.methods({
  foo: function(param1, param2, callback){
    // To something here
    callback('bar');
  }
});

By default all urls will be allowed to connect to your extension. But you can secure it by whitelisting specific urls:

ChromeExtension.whitelistUrl('http://localhost:3000/');
ChromeExtension.whitelistUrl('http://myapp.meteor.com/');

Keywords

meteor

FAQs

Package last updated on 23 Jul 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