Closed Jamesking56 closed 4 years ago
@Jamesking56 your fiddle seems to be empty.
@mariojankovic sorry I forgot to save it, here's a new one: https://jsfiddle.net/x98jf1m6/
@Jamesking56 So I spent several hours upgrading the whole package (almost replacing it completely) to what seems a more complete solution now. Please see this fiddle which uses my fork: https://jsfiddle.net/f38j7qyk/
Also the fork can be found here: https://github.com/mariojankovic/gdpr-cookie-consent-banner
The fix itself was rather simple though, my main.js
file replaces the object options
with props
which is required by Svelte to pass over props in plain JS.
Other than that, these improvements have been made:
Word of caution though. This has been scarcely tested and potentially needs to be upgraded further in the next few days. But for the time being, you can try it out and let me know if it suits your needs
@antony do you mind taking a look into this and see if this is a worthy pull request candidate or should I (and actually am I allowed) to maintain this as a completely separate repo?
It looks really good :+1: thanks for the solid effort I really think it'll be a good candidate for my sites
@mariojankovic Oh wow - thanks for this, I think this is a great solution, I'd love to merge it when you're happy that it is ready?
I had been meaning to work on this a little more, and hadn't actually spotted this github issue, so sorry @Jamesking56 !
Let me know when you think it's ready to go (and I'll do some testing of my own also) and we can get it in mainline.
Thank you guys.
@Jamesking56 there's been an issue with saving cookies. If you're using my fork (for now, since @antony agreed to merge my changes to master) you can try the latest update and let me know if it works.
There's a new option too that displays a button by default called showOnInit
which enables tweaking of already selected cookies (say users don't want to opt-in for analytics any longer or have misclicked the first time). Here's a fiddle with the newest update: https://jsfiddle.net/2f1phy3t/1/
Error appears when trying to use this in vanilla JS:
"You must set gdpr cookie name"
I'm using the code from your Readme:
Here is a JSFiddle: https://jsfiddle.net/7L1magne/