Socket
Book a DemoInstallSign in
Socket

hd-feedback

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hd-feedback

The simple feedback(include screenshot) for any website.

0.0.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

hd-feedback

The simple feedback(include screenshot) for any website.

Usage

hdFeedback.init({
  lang: 'zh-cn',
  onSend: () => {
    return new Promise(resolve => {
      setTimeout(() => {
        resolve(true);
      }, 3000);
    });
  }
});
// Some times, call openFeedback function.
function openFeedback() {
  hdFeedback.show();
}

Options

{
  i18n: {
    'zh-tw': {
      headerText: 'Feedback', // 标题文字
      inputPlaceHolder: 'Please enter your suggestion.', // 输入框提示文字
      includeScreenshot: 'Include Screenshot', // 是否包含截图
      sendBrowserInfo: 'Send Browser Info', // 发送浏览器信息
      cancelText: 'Cancel', // 取消按钮
      okText: 'Send', // 确定按钮
      screenshotShoting: 'Screenshoting...' // 截图中
    }
  }, // 【可选】自定义多语言实现
  lang: 'en-us', // 【可选】当前选中的语言,可选 ['en-us', 'zh-cn'],默认 'en-us'
  html2canvasOptions, // 【可选】html2canvas截图配置,请参考:https://html2canvas.hertzen.com/documentation.html
  onSend: data => { // 点击Send要执行的函数
    // data会反馈的数据,包含
    data: {
      content: '', // 用户输入的内容
      canvas: Canvas, // 截图的Canvas
      sendBrowserInfo: false // 是否要上传浏览器信息
    }
  }
}

Keywords

Feedback

FAQs

Package last updated on 30 Nov 2017

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.