help-widget

1.0.0 • Public • Published

Help Widget

This is a template for adding a generic intercom-like help widget to your site.

Check out the demo.

Develop

  • yarn
  • yarn start

Use

  • yarn
  • yarn build release
  • Add this to your html:
  (function (w,d,s,o,f,js,fjs) {
    w['help-widget']=o;w[o] = w[o] || function () { (w[o].q = w[o].q || []).push(arguments) };
    js = d.createElement(s), fjs = d.getElementsByTagName(s)[0];
    js.id = o; js.src = f; js.async = 1; fjs.parentNode.insertBefore(js, fjs);
  }(window, document, 'script', 'hw', './widget.js'));
  hw('init', { });
  hw('message', '');
  • Replace ./widget.js with built javascript file

Based on JS Widget.

🙋🏻‍♂️ Made by @alisalahio

Readme

Keywords

Package Sidebar

Install

npm i help-widget

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

30.2 kB

Total Files

14

Last publish

Collaborators

  • alisalahio