Created
December 10, 2015 10:31
-
-
Save Preen/214b7b7eb4b907c70b65 to your computer and use it in GitHub Desktop.
A solution for Bugherd to play nice with Turbolinks. Otherwise you might get errors and the sidebar wont show up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ -> | |
$(document).on 'page:change', -> | |
console.log 'page:change' | |
insertBugherd(); | |
window.insertBugherd = -> | |
window._bugHerd = null | |
$script = $("<script>").attr | |
'type' : 'text/javascript' | |
'src' : '//www.bugherd.com/sidebarv2.js?apikey=[YOUR API KEY HERE]' | |
$script.appendTo("body"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment