zendesk supplies feedback tab.
Setting up your Feedback Tab channel : Zendesk Support
but it doesn't run collectly with turbolinks.
so I decided to create own zenbox.js
- copy "zenbox.js" into vendor/assets/javascripts
- require zenbox.js from application.js
# = require zenbox.js
- paste following lines into layouts/application.html
$(function(){
window.zenbox_params = {
dropboxID: "your id",
url: "https://yourname.zendesk.com",
tabTooltip: "Support",
tabImageURL: "https://p1.zdassets.com/external/zenbox/images/tab_ja_support.png",
tabColor: "black",
tabPosition: "Left"
}
Zenbox.init(window.zenbox_params);
});
- binding to 'page:load' not 'load'
- window.Zenbox has an function nullifyTab
it nullifies an local variable named 'tab'. Zenbox.init creates elements if only !tab is true. So we must nullify tab before init.