8000 Add HelpScout beacon · TailorDev/assignees@5d3e0ed · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Commit

Permalink
Add HelpScout beacon
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Feb 4, 2017
1 parent 0a627c1 commit 5d3e0ed
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
39 changes: 39 additions & 0 deletions public/js/beacon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
(function(e, o, n) {
window.HSCW = o, window.HS = n, n.beacon = n.beacon || {};

var t = n.beacon;
t.userConfig = {}, t.readyQueue = [], t.config = function(e) {
this.userConfig = e
}, t.ready = function(e) {
this.readyQueue.push(e)
}, o.config = {
docs: {
enabled: false,
baseUrl: ""
},
contact: {
enabled: true,
formId: "d6ab6d89-eaf4-11e6-8789-0a5fecc78a4d"
}
};

var r = e.getElementsByTagName("script")[0],
c = e.createElement("script");

c.type = "text/javascript";
c.async = true;
c.src = "//djtflbt20bdde.cloudfront.net/";
r.parentNode.insertBefore(c, r);
})(document, window.HSCW || {}, window.HS || {});

HS.beacon.config({
color: '#2ac5ee',
icon: 'message',
topics: [
{ val: 'needs-help', label: 'I need some help' },
{ val: 'feature-request', label: 'I would like to suggest a feature' },
{ val: 'feedback', label: 'I would like to leave feedback' },
{ val: 'bug', label: 'I think I found a bug'},
{ val: 'other', label: 'Other'}
]
});
2 changes: 2 additions & 0 deletions views/layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ html
script(src='/js/lib/jquery-2.2.4.min.js')
script(src='/js/lib/bootstrap.min.js')
script(src='/js/lib/bootstrap-select.min.js')
if user
script(src='/js/beacon.js')

0 comments on commit 5d3e0ed

Please sign in to comment.
0