How can I load different CSS files when no consent has been given? #259
Answered
by
fritzmg
Fanni-Portier
asked this question in
Q&A
-
Can I load different CSS files with and without consent? I need this function to load myFonts (with count file) only after consent. |
Beta Was this translation helpful? Give feedback.
Answered by
fritzmg
Apr 4, 2022
Replies: 2 comments
-
Yes, you can do that via a custom script that will only be executed once consent was given. See https://github.com/oveleon/contao-cookiebar/blob/master/docs/EXTENDED_USAGE.md const link = document.createElement('link');
link.href = '…';
link.rel = 'stylesheet';
document.head.append(link); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
zoglo
-
Great! Thank you very much! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, you can do that via a custom script that will only be executed once consent was given. See https://github.com/oveleon/contao-cookiebar/blob/master/docs/EXTENDED_USAGE.md