Jersyfi / js-cookify

Simple cookie consent manager with tracking possibility in pure javascript.
https://cookify.jersyfi.dev/
MIT License
16 stars 4 forks source link

Setting of the 'support' flag doesn't work #7

Closed Joerg-archived closed 3 years ago

Joerg-archived commented 3 years ago

When creating the cookify object, e.g. with window.top.cookify = new Cookify({ 'support': false, ..., 'run': true });

doesn't work since its parsed incorrectly in cookify.js:

switch (type) {
        case 'name':
            this.initName(element, type);
            break;

        case 'expire':
            this.initExpire(element, type);
            break;

        case 'support':
            this.initExpire(element, type);
            break;
        ....

I think this should be

 case 'support':
     this.initSupport(element, type);
     break;
Jersyfi commented 3 years ago

Thank you for your bug fix. I appreciate this and sorry for my late reply to this issue but i was busy with my exams. I released a new Version with some fixes. https://github.com/Jersyfi/Cookify/releases/tag/v2.1.1