@elvoss, You will probably find errors in the console, because of the import statement.
The following is one way of making the app work (using Quark):
- Go to Releases · js-cookie/js-cookie · GitHub and download file js.cookie.mjs into folder user/themes/quark/js
- Change the import statement in file youtube-consent.js into:
import Cookies from './js.cookie.mjs'; - Update /user/themes/quark/templates/partials/base.html.twig with:
{% do assets.addJs('theme://js/youtube-consent.js', { group:'bottom', type:'module' }) %}
Note: Do not make any changes inside an installed theme. Always make changes in an inhering theme.
Update: Not all webservers (e.g. PHP’s build-in server) appear to support a mime-type for extension mjs. You can rename file js.cookie.mjs into js.cookie.js and update the import statement accordinly. See reply #9.