Last active
January 17, 2018 19:27
-
-
Save metaskills/b091c4075a8aa5988c0673aa94e09748 to your computer and use it in GitHub Desktop.
LivePerson/Engage Turbolinks Hacking
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
// 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