Skip to content
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

Only load the inline script for animations if needed #3006

Closed
bfintal opened this issue Dec 11, 2023 · 1 comment · Fixed by #3015
Closed

Only load the inline script for animations if needed #3006

bfintal opened this issue Dec 11, 2023 · 1 comment · Fixed by #3015
Assignees

Comments

@bfintal
Copy link
Contributor

bfintal commented Dec 11, 2023

In the frontend, Stackable outputs this:

<script>requestAnimationFrame(() => document.body.classList.add( "stk--anim-init" ))</script>

Since this is only used for animations, we need to only add this when needed.

@andeng1106
Copy link

andeng1106 commented Jan 3, 2024

QA notes:

  • If free build, should not load whether i have premium animations or not in the page
  • If premium build, should only load when i have premium animations in the page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants