Small feedback library inspired by https://github.com/ivoviz/feedback Gets screenshot, url, browser info, html, and comments from user.
Filesize minified/compressed: ~6KB (html2canvas not included)
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.5.0-beta4/html2canvas.min.js"></script>
<script>
var feedback = new Feedback({ onSubmit: function(data) {
// do something
console.log(data);
} });
feedback.showButton();
// or
// feedback.attach(document.getElementById('my-feedback-btn'));
</script>
Use feedback.showButton
to render a button or attach to your own with feedback.attach
.
onSubmit
Callback that receives feedback data objecthtml2canvas
Pass html2canvas object. Default:window.html2canvas
includeBrowserInfo
: Default: trueincludeUrl
: Default: trueincludeHtml
: Default: true
{
browser: <Object>
html: <String>
img: <String>
url: <String>
note: <String>
}
npm install
// run weback dev server
npm start
// build dist
npm run build
MIT