Giter Club home page Giter Club logo

storytime's Introduction

@papercups-io/storytime

Papercups screen sharing feature

NPM JavaScript Style Guide

Demo

Screenshot: Screen Shot 2020-11-02 at 2 35 02 PM

GIF: demo

Install

npm install --save @papercups-io/storytime

Usage

First, sign up at https://app.papercups.io/register to get your account token. Your account token is what you will use to pass in as the accountId prop below.

Using in HTML

Paste the code below between your <head> and </head> tags:

<!-- 
  Note that if you already have included the `window.Papercups` configuration with the chat widget, 
  you should **NOT** duplicate it here! All the config settings should be the same for now.
-->
<script>
  window.Papercups = {
    config: {
      // Pass in your Papercups account token here after signing up
      accountId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx',
      // Optionally pass in metadata to identify the customer
      customer: {
        name: 'Test User',
        email: '[email protected]',
        external_id: '123',
      },
      // Optionally specify the base URL
      baseUrl: 'https://app.papercups.io',
    },
  };
</script>
<script
  type="text/javascript"
  async
  defer
  src="https://app.papercups.io/storytime.js"
></script>

โš ๏ธ Note that if you already have included the window.Papercups configuration with the chat widget, you should NOT duplicate it here!

If you already have the config set, just include this script below it:

<script
  type="text/javascript"
  async
  defer
  src="https://app.papercups.io/storytime.js"
></script>

Using as an NPM module

Place the code below in any pages on which you would like to render the widget. If you'd like to render it in all pages by default, place it in the root component of your app.

import {Storytime} from '@papercups-io/storytime';

const st = Storytime.init({
  // Pass in your Papercups account token here after signing up 
  accountId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx',
  // Optionally specify the base URL
  baseUrl: 'https://app.papercups.io',
});

// If you want to stop the session recording manually, you can call:
// st.finish();

// Otherwise, the recording will stop as soon as the user exits your website.

storytime's People

Contributors

reichert621 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.