Skip to content

Instantly share code, notes, and snippets.

@metaskills
Last active January 17, 2018 19:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save metaskills/b091c4075a8aa5988c0673aa94e09748 to your computer and use it in GitHub Desktop.
Save metaskills/b091c4075a8aa5988c0673aa94e09748 to your computer and use it in GitHub Desktop.
LivePerson/Engage Turbolinks Hacking
// Assuming you put the LP init code into a function called window.lpTagCustomInit
document.addEventListener('turbolinks:before-cache', function(){
jQuery("[id^='LP_DIV']").empty();
})
document.addEventListener('turbolinks:load', function(){
delete window.liveperson;
delete window.lpMTagConfig;
delete window.lpTag;
window.lpTagCustomInit();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment