New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cometchat-pro/liftoff

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cometchat-pro/liftoff

Liftoff is a drop-in cross-platform chat widget that provides a ready-to-use UI

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-25%
Maintainers
3
Weekly downloads
 
Created
Source

This guide demonstrates how to add Liftoff in your website.

1. Configuration

Signup for CometChat to get your Application Id and Application Auth Token.

Steps:

  1. Create a new app and get AppID
  2. Head over to the API Keys section and click on the **Create API Key ** button
  3. Enter a name and select the scope as Auth Only
  4. Now note the API Key and App ID
  5. Create an Auth Token via the CometChat API

Add the Liftoff Plugin Dependency in your project.

npm install @cometchat-pro/liftoff --save

import {Liftoff} from '@cometchat-pro/liftoff';

2. Launch the Application

1. Initialize Liftoff plugin


Liftoff.init(APP_ID).then(
   ()=> {
     console.log("Application is initialized");
   }, 
  error => {
    console.log("Initialized failed with error : " + error);
  }
} //end 

After the initialization is completed, You can launch the Liftoff plugin using Launch method.

2. Launch Liftoff Plugin

let chatView = document.getElementsByTagName("BODY")[0];
let UID = "superhero1";
let CID = "superhero2";

let settings = new Liftoff.LiftoffSettingsBuilder(UID,"AUTH_TOKEN",chatView)
                  .setConversationID(CID)
                  .setConversationType(Liftoff.ConversationType.USER)
                	.build();

Liftoff.launch(liftoffsettings);

3. Set your custom theme colour.

Add theme color using setPrimaryColor() and pass color hex code in argument.


let chatView = document.getElementsByTagName("BODY")[0];
let UID = "superhero1";
let CID = "superhero2";
let color "#7b56a4";

let settings = new Liftoff.LiftoffSettingsBuilder(UID,"AUTH_TOKEN",chatView)
                  .setConversationID(CID)
                  .setConversationType(Liftoff.ConversationType.USER)
                  .setPrimaryColor(color)
                	.build();

Liftoff.launch(liftoffsettings);

To learn more, please refer to our javascript Developer Documentation.

Keywords

FAQs

Package last updated on 01 Oct 2019

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