Skip to content

Insert script immediately if loaded with Turbo #352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 8, 2024
Merged

Insert script immediately if loaded with Turbo #352

merged 3 commits into from
Apr 8, 2024

Conversation

eugeneius
Copy link
Contributor

For #351.

When the Messenger shim is loaded with Turbo, the load event has already fired, so adding an event listener for it won't have any effect. Instead we can immediately add the script tag to the page.

Also stop calling Intercom('reattach_activator'), which is an obsolete API that no longer does anything.

When the Messenger shim is loaded with Turbo, the load event has already
fired, so adding an event listener for it won't have any effect. Instead
we can immediately add the script tag to the page.
This API is obsolete and no longer has any effect.
@eugeneius eugeneius merged commit b9a9155 into master Apr 8, 2024
@eugeneius eugeneius deleted the turbo branch April 8, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants