Appearance
Opening Ybug programmatically
Ybug normally opens when someone clicks the launcher button in the bottom-right corner.
If you want to open it on a different event, add a small snippet of code to any element in your project. This way you can implement your own custom launcher button.
With markup
html
<a href="#" data-ybug="open">Feedback</a>Example: Your feedback
You can also hide the standard Ybug launcher button by passing hide_launcher: true in the ybug_settings object:
javascript
window.ybug_settings = {
id: 'XXXXXXXXX',
hide_launcher: true
};WARNING
The hide_launcher: true option set directly in your widget's JavaScript snippet acts as a master switch. If active, it hides the feedback button everywhere, regardless of any URL or user targeting rules configured in your Ybug dashboard.
If you need to skip the welcome step and open the feedback form directly, pass skip_to: 'feedback' in the ybug_settings.
With JavaScript
Ybug exposes a simple JavaScript API. Use Ybug.open() and Ybug.close() to control the widget programmatically:
javascript
// Open the widget
Ybug.open();
// Open the feedback form
Ybug.open('feedback');
// Close the widget :-)
Ybug.close();To open a particular feedback step, pass an additional parameter to open(): Ybug.open('feedback').
Example: Open feedback form or Open annotate tool.
Keyboard shortcut
You can also enable the Alt+Y keyboard shortcut for opening the Ybug widget. The shortcut must be enabled by passing shortcut: true in the ybug_settings object:
javascript
window.ybug_settings = {
id: 'XXXXXXXXX',
shortcut: true
};