Nonvoluntary Professional Mangling

    @userback/widget
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.4 • Public • Published

    @userback/widget

    The official NPM module for embedding the Userback.io widget into your Javascript or Typescript application.

    Installation

    npm i @userback/widget or yarn add @userback/widget

    Quickstart

    import Userback from '@userback/widget'
    Userback('**USERBACK_TOKEN**')

    Examples

    Show the Userback Widget immediately after loading on the bug screen.

    Userback(..).then(ub => {
        ub.show('bug')
    })

    Or delay showing it until later:

    Userback(.., { autohide: true }).then(ub => {
        document.querySelector('button.show-feedback').addEventListener('click', function(){
            ub.show()
        })
    })

    Using the options object to enable native screenshots while binding screenshots to a HTML button:

    const userback = await Userback(..., { navtive_screenshot: true })
    document.querySelector('button.screenshot').addEventListener('click', (event) => {
        event.preventDefault()
        userback.open('bug', 'screenshot')
    })

    After initialisation, you can use the named function getUserback to get a reference to the UserbackWidget.

    import { getUserback } from '@userback/widget'
    
    document.querySelector('button.screenshot').addEventListener('click', (event) => {
        event.preventDefault()
        getUserback().open('bug', 'screenshot')
    })

    For more information about available configuration settings and and functions available, see our Javascript API

    Keywords

    Install

    npm i @userback/widget

    DownloadsWeekly Downloads

    3,103

    Version

    0.1.4

    License

    MIT

    Unpacked Size

    24.9 kB

    Total Files

    7

    Last publish

    Collaborators

    • shard
    • lle_userback