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

Using cookie-bar as npm module (as opposed pulling from CDN) #112

Open
thedotedge opened this issue Oct 7, 2020 · 1 comment
Open

Using cookie-bar as npm module (as opposed pulling from CDN) #112

thedotedge opened this issue Oct 7, 2020 · 1 comment

Comments

@thedotedge
Copy link

Is there any way to use cookie-bar as browser npm dependency (i. e. in webpack bundle), without pulling it from CDN?

Looks like the config always gets parameters from the URL and it's not possible to pass them as a configuration object setupCookieBar().

@ToX82
Copy link
Owner

ToX82 commented Oct 7, 2020

Hello @thedotedge
cookiebar is indeed intended to be configured through the script url, like this:

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/cookie-bar/cookiebar-latest.min.js?always=1&top=1"></script>

I'm afraid that configuring it through other methods is not currently possible. It would be a nice addition though, and it shouldn't be that difficult to implement.

I will definitely look into it, but if you wish to contribute with a PR I'd be very happy to merge it.

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

No branches or pull requests

2 participants