Giter Club home page Giter Club logo

cookieconsent's Introduction

Cookieconsent Script

A script that displays a cookie consent message as required by EU regulation (GDPR). The plugin displays a message on the user's first visit and they have the ability to consent to different categories of cookies and services.

See the demo: Cookieconsent

Default look

Cookieconsent modal

Features

  • IE11 compatible
  • Four different blocking methods
  • Multilingual
  • Mobile ready

Currently it can block all the bad cookie monsters in 4 ways:

Dynamic script tags

Some services insert dynamically created SCRIPT tags to the HEAD at page load. These can be intercepted and blocked.

Script tag blocking

Some third party services require you to insert a SCRIPT tag into your HTML pages. These can be inactivated until the user allowes them.

Script wrapping

Some services are not inserted in a SCRIPT tag and are obscured by layers of other code. Thats why this script creates a global wrapper function what you can use to wrap and block any JS code.

Local cookies

Finally the local cookies set on your domain can be also filtered by overriding the bowsers COOKIE SET method.

Usage

  1. Download the file cookieconsent.zip from the latest release and unpack its content.

  2. Include the script file into your HTML page before everything else.

<script src="cookieconsent.js"></script>
  1. Call the init() function with the configuration object.

See a working example in the docs folder.

Configuration object

The script is being controlled mainly by a configuration object which is passed to the inital call. It acts as configuration and a global state object.

<script>
  window.CookieConsent.init({
    // More link URL on bar.
    modalMainTextMoreLink: null,
    // How long to wait until bar or initial modal comes up.
    UITimeout: 1000,
    // Show 'bar' or 'modal' initial layout
    mode: 'bar'
    // Look and feel.
    theme: {
      barColor: '#2C7CBF',
      barTextColor: '#FFF',
      barMainButtonColor: '#FFF',
      barMainButtonTextColor: '#2C7CBF',
      modalMainButtonColor: '#4285F4',
      modalMainButtonTextColor: '#FFF',
    },
    language: {
      // Current language.
      current: 'en',
      locale: {
        en: {
          barMainText: 'This website uses cookies to ensure you get the best experience on our website.',
          closeAriaLabel: 'close',
          barLinkSetting: 'Cookie Settings',
          barBtnAcceptAll: 'Accept all cookies',
          modalMainTitle: 'Cookie settings',
          modalMainText: 'Cookies are small pieces of data sent from a website and stored on the user\'s computer by the user\'s web browser while the user is browsing. Your browser stores each message in a small file, called cookie. When you request another page from the server, your browser sends the cookie back to the server. Cookies were designed to be a reliable mechanism for websites to remember information or to record the user\'s browsing activity.',
          modalBtnSave: 'Save current settings',
          modalBtnAcceptAll: 'Accept all cookies and close',
          modalAffectedSolutions: 'Affected solutions:',
          learnMore: 'Learn More',
          on: 'On',
          off: 'Off',
          enabled: 'is enabled.',
          disabled: 'is disabled.',
          checked: 'checked',
          unchecked: 'unchecked',
        },
        hu: {
          barMainText: 'Ez a weboldal Sütiket használ a jobb felhasználói élmény érdekében.',
          closeAriaLabel: 'bezár',
          barLinkSetting: 'Süti beállítások',
          barBtnAcceptAll: 'Minden süti elfogadása',
          modalMainTitle: 'Süti beállítások',
          modalMainText: 'A HTTP-süti (általában egyszerűen süti, illetve angolul cookie) egy információcsomag, amelyet a szerver küld a webböngészőnek, majd a böngésző visszaküld a szervernek minden, a szerver felé irányított kérés alkalmával. Amikor egy weboldalt kérünk le a szervertől, akkor a böngésző elküldi a számára elérhető sütiket. A süti-ket úgy tervezték, hogy megbízható mechanizmust biztosítsanak a webhelyek számára az információk megőrzésére vagy a felhasználók böngészési tevékenységének rögzítésére.',
          modalBtnSave: 'Beállítások mentése',
          modalBtnAcceptAll: 'Minden Süti elfogadása',
          modalAffectedSolutions: 'Mire lesz ez hatással:',
          learnMore: 'Tudj meg többet',
          on: 'Be',
          off: 'Ki',
          enabled: 'bekapcsolva.',
          disabled: 'kikapcsolva.',
          checked: 'kipipálva',
          unchecked: 'nincs kipipálva',
        }
      }
    },
    // List all the categories you want to display.
    categories: {
      // Unique name.
      // This probably will be the default category.
      necessary: {
        // The cookies here are necessary and category can't be turned off.
        // Wanted config value will be ignored.
        needed: true,
        // The cookies in this category will be let trough.
        // This probably should be false if category not necessary.
        wanted: true,
        // If checkbox is on or off at first run.
        checked: true,
        // Language settings for categories.
        language: {
          locale: {
            en: {
              name: 'Strictly Necessary Cookies',
              description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur eu commodo est, nec gravida odio. Suspendisse scelerisque a ex nec semper.',
            },
            hu: {
              name: 'Szükséges sütik',
              description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur eu commodo est, nec gravida odio. Suspendisse scelerisque a ex nec semper.',
            }
          }
        }
      }
    },
    // List actual services here.
    services: {
      // Unique name.
      analytics: {
        // Existing category Unique name.
        // This example shows how to block Google Analytics.
        category: 'necessary',
        // Type of blocking to apply here.
        // This depends on the type of script we are trying to block.
        // Can be: dynamic-script, script-tag, wrapped, localcookie.
        type: 'dynamic-script',
        // Only needed if "type: dynamic-script".
        // The filter will look for this keyword in inserted scipt tags
        //  and block if match found.
        search: 'analytics',
        // List of known cookie names or regular expressions matching
        //  cookie names placed by this service.
        // These will be removed from current domain and .domain.
        cookies: [
          {
            // Known cookie name.
            name: '_gid',
            // Expected cookie domain.
            domain: `.${window.location.hostname}`
          },
          {
            // Regex matching cookie name.
            name: /^_ga/,
            domain: `.${window.location.hostname}`
          }
        ],
        language: {
          locale: {
            en: {
              name: 'Google Analytics'
            },
            hu: {
              name: 'Google Analytics'
            }
          }
        }
      }
    },
    //List consent properties according to Google Consent Mode v2, and their respecting controlling categories listed above.
    consentModeControls: {
      ad_storage: 'necessary',
      ad_user_data: 'necessary',
      ad_personalization: 'necessary'
      analytics_storage: 'necessary'
    },
  });
  </script>

Consent Mode v2

Google consent mode v2 is supported. For it's implementation you need to add a consentModeControls object withing the configuration settings to list the consent types and what categories will control them just as described in the example. Please, bear in mind that Google Tag Manager should be initialized with the default consent settings as per this example:

  <!-- Google Tag Manager -->
      <script>
      window.dataLayer = window.dataLayer || [];
      function gtag() {
        dataLayer.push(arguments);
      }
      const defaultSettings = {
        ad_storage: 'granted',
        ad_user_data: 'granted',
        ad_personalization: 'granted',
        analytics_storage: 'granted',
      };
      const defaultRegionalSettings = {
        ad_storage: 'denied',
        ad_user_data: 'denied',
        ad_personalization: 'denied',
        analytics_storage: 'denied',
        region: [
          'AT',
          'BE',
          'IS',
          'LI',
          'NO',
        ],
      };
      if (localStorage.getItem('consentMode') === null) {
        gtag('consent', 'default', defaultSettings);
        gtag('consent', 'default', defaultRegionalSettings);
      } else {
        gtag('consent', 'default', {
          ...defaultRegionalSettings,
          ...JSON.parse(localStorage.getItem('consentMode')),
        });
        gtag('consent', 'default', {
          ...defaultSettings,
          ...JSON.parse(localStorage.getItem('consentMode')),
        });
      }
      (function (w, d, s, l, i) {
        w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });
        var f = d.getElementsByTagName(s)[0],
          j = d.createElement(s),
          dl = l != 'dataLayer' ? '&l=' + l : '';
        j.async = true;
        j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
        f.parentNode.insertBefore(j, f);
      })(window, document, 'script', 'dataLayer', '---GTM-ID---');
    </script>
  <!-- End Google Tag Manager -->

Whenever a consent option is modified by the user, an update is sent to Google Tag Manager setting the new consent configuration. This example implements regional consent mode. Adjust this snippet as needed.

Sponsors

Contributed to diginomica by Brainsum, sponsored by diginomica.

cookieconsent's People

Contributors

altcatalin avatar balazs9703 avatar berwiecom avatar brainsoap avatar dependabot[bot] avatar keeteean avatar l-besenyei avatar millnitzluan avatar pedro-p avatar vedmant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cookieconsent's Issues

Option to disable style rendering

To disable inline rendering of the CSS styles, it would be great to have an option for that.
Maybe the "theme" option could be used. If the value is false the rendering of the CSS styles is disabled.
With this possibility we could render the styles inside our own CSS files.

the script does not store the cookie settings

Every time, on every page - even refresh - I have to take my cookie consent. It does not store my settings.
I use the latest 1.5.0 version.
I use the script with Drupal 10.2.5 in the theme html.html.twig.
I see in the example it works well, what do I miss?
Is any other js need from the project?

Google AdSense _glc_au cookie not blocked

Hi all,
Using adsense: { category: "<category name>", type: "script-tag", cookies: [ {name: "_gcl_au", domain: '<domain name>'} ], language: {locale: {en: {name: "Google Adsense"}}} }, as one of the services I still see the cookie _gcl_au popping up when it is supposed to be blocked.

The following scripts are used to generate this cookie:

 <script id="googleTagManager2" async src="https://www.googletagmanager.com/gtag/js?id=<ID>">
 </script>
 
 <script id="googleTagManager">
         window.dataLayer = window.dataLayer || [];
         function gtag(){dataLayer.push(arguments);}
         gtag('js', new Date());
         gtag('config', '<ID>);
 </script>

Does anyone might have an idea what I am doing wrong?

No license

I would like to ask you, if you could add any license information to the repository.

Accessibility fixes

Hi,

I'm identifying various Web accessibility (accessibility to those with disabilities).

I'd like to submit one or more fixes / pull requests for these — is this OK please?

Things that need fixing:

  • — Ensure all buttons (including those that use <div>) are given a role of 'button' — for screen reader/ non-visual users;
  • — Ensure all buttons can be navigated to and activated with the keyboard ('TAB', shift-TAB, Enter keys) — keyboard users, including screen reader/ non-visual users;
  • — Ensure all buttons have a suitable label/ name — non-visual users;
  • — Ensure the cookie-bar and cookie-modal have WAI-ARIA landmark regions, and labels;
  • — Ensure the cookie-modal behaves like proper modal (that is, links behind are inactive/ cannot be navigated to);
  • More ...?

A number of the above are fairly straightforward fixes.

I'll let you know how I get on.

Yours,

Nick


Translation of "Cookie notice" in Hungarian ?!

Firts loading web site

When the first loading of the website occurs and the button to accept all cookies has not yet been clicked and the consent mode is denied by default, should google analytics track that first visit?

cconsent cookie expires after 7 days - can it be longer?

Hi, currenlty the preferences stored in the 'cconsent' cookie expire after 7 days so the user has to set them again. Is there a GDPR reason for that? I looked but couldn't see any option to alter that date via the options.

Is there a way to extend this to a year?

Many thanks!

Event Consent State allways 'Granted' in Google

Hi. I'm about to implement Brainsum Cookie Consent Mode v2 on my webpage. It seems to work fine, but when I debug with Google Tag Assistent it seems like something is wrong.

I run Google Tag Assistant on this website: https://test.nettdating.no.

Output of AW-959228164 and G-SMHSHTEPSS returns Event Consent State 'Denied' on 'ad_storage', 'analytics_storage', 'ad_user_data' and 'ad_personalization' by default. That seems to be correct. When I click "Accept all cookies" on the consent banner, I get 'Granted' on all Event Content States. Thats seems to be correct as well.

But, if I choose "Cookie Settings" and "Save current settings" with everything 'Off' (default selection), I still get 'Granted' on all Event Content States in Google Tag Assistant. That seems to be wrong, since Analytics, Marketing and Various Cookies was turned off.

Why is Event Consent State set to Granted, even if everything is turned off before clicking "Save current settings"?

Scripts blocked with 'script-tag' type should run when the user clicks accept without reload

Steps to reproduce

  1. Add a script e.g. google tag manager to a webpage
<script type="text/plain" data-consent="googletagmanager">
  // tag manager code here
</script>
  1. Add google tag manager as a service in CookieConsent config
services: {
  google_tag_manager: {
    category: 'marketing',
    type: 'script-tag',
    search: 'googletagmanager',
    language: {
    locale: {
        en: {
          name: 'Google tag manager'
        }
      }
    }
  }
}
  1. Visit website and click accept all cookies

expected behavior: Google tag manager is re-inserted with type="text/javascript" and runs

actual behavior: Nothing happens. The tag manager script will run after user reloads the page

Add "Reject All" option

Since March 31 it's necessary to have an "Reject all" option to be in compliance with the GDPR.

I noticed that it was implemented in #49 which has been closed, any possibility to add this feature?

ScriptTagFilter behavior

I can't find documentation on script-tag but from looking at the code I'm guessing that you're supposed to modify your script type to be 'text/plain' instead of 'text/javascript' and then cookieconsent will restore it to javascript if there is consent.

If so, is there a reason this is done differently from dynamic-script? Seems like it would be easier for the user if the same mechanism was used in both places?

learnMore not working

It is possible so set text for "learnMore" but there is no possiblity to set a link for "learn more". This is needed to have a link to privacy policy

Wrong use of language variables

I've noticed that the language variable learnMore is not used. I assume this should be used for the modalMainTextMoreLink. But instead of that, the modalMainTitle variable is used for the link, which seems wrong.

Default cookie state isn't showing correct icon

Hi folks,

Maybe I'm seeing something wrong here, but when I try things out, I see everything working correctly, except:
When I have for example a cookie which is declined by default (status switch is OFF by default) the icon shows the accepted icon "V" instead of "X". I have to click / tap the corresponding switch 2 times ( status = OFF by default. Tap 1: status= ON, Tap 2: status = OF ) to show the correct icon. This is a bit confusing for me.

I'm absolutely no developer, but it looks like it's not looking at / responding to the default settings before the rest is loaded.

I hope anyone has an idea here :-) Maybe I'm totally wrong.

Cookie-consent-status-bug

Reopen dialog

Hi, is there a way to reopen the dialog once closed?

The only way found at the time is:

document.querySelector('.ccb__edit').click()

Sometimes parsing bad cookie at initialization

When you have adobe analytics activated, you have a cookie coming from adobe analytics and containing the list of user cookies (included cconsent)
I think
if (item.indexOf('cconsent') >= 0) {
should be replaced by
if (item.indexOf('cconsent**=**') >= 0) or ensure the string start with ccontent to be sure the correct cookie will be parsed

How to block Facebook pixel?

How to block Facebook pixel?

This code is not working.

analytics_ext: { // Existing category Unique name // This example shows how to block Google Analytics category: 'tracking', // Type of blocking to apply here. // This depends on the type of script we are trying to block // Can be: dynamic-script, script-tag, wrapped, localcookie type: 'dynamic-script', // Only needed if "type: dynamic-script" // The filter will look for this keyword in inserted scipt tags // and block if match found search: 'analytics', // List of known cookie names or Regular expressions matching // cookie names placed by this service. // These willbe removed from current domain and .domain. cookies: [ { // Known cookie name. name: '_fbp', // Expected cookie domain. domain:.${window.location.hostname} } ], language: { locale: { de: { name: 'Facebook Pixel' } } }

thanks

when user changes his cookie settings, cookies are not deleted

When I want to changes my cookies settings, module don't delete settled cookies.
Example :
I have 2 categories, necessary and marketing
in my marketing category

marketing: { needed: false, wanted: false, checked: false,

I have google analytics in these category, I can choice to accept these cookies without problem but if I modify my first choice and deselect the checkbox marketing and choice to save again current settings ... marketing cookies are not deleted.

Is it possible to have a functionality like that ?

Make cookie consent stay visible on all pages

I have followed the following code in the readme:Brainsum CookieConsent

I have inserted the code shown in the link (the code under the title Configuration object) inside index.html, and it pops up as it should. However, as soon as I change to another page on my website, the popup is gone, i.e. it is only visible on index.html. My question is, how can I make the cookie consent visible on all pages of my website until the user either accepts or rejects the cookies?

reload page after consent and question about language

Is it possible to automaticly reload the page as soon as a user has given his consent.

And how exactly is the language change working? I need "de" and "en". I also have set the text for both languages in the code. (The current language is set 'de' but when switching to the englisch site, the content is not changing)

language: {
      current: 'de',
      locale: {
        en: {
          barMainText: 'This website uses cookies to ensure you get the best experience on our website.',
          barLinkSetting: 'Cookie Settings',
         ...
         },
       de: {
          barMainText: Diese Website verwendet Cookies um Ihnen...,
          barLinkSetting: 'Cookie Einstellungen',
         ...
         }
     }
},

Which license ... ISC or GPL ...?

Hi,

Thanks for the library.

I'm confused -- package.json says ISC; LICENSE says GPL.

Please can you settle on one license, and make these two files match?

You won't get much usage or many contributions until the license is settled!

Relates to :~ #3;

Btw, a more permissive license, e.g. MIT, ISC etc. is common for libraries, while GPL is often applied to complete applications - WordPress, Moodle etc.

Thank you,

Nick

Doesnt work with Google Analytics

Hi,

I have the following code:

<title>test</title> <script type="text/javascript" src="cookieconsent.min.js"></script><script type="text/javascript"> <script src="https://www.googletagmanager.com/gtag/js?id=-my-gtag-id" type="text/plain" data-consent="googlead"></script> <script type="text/plain" data-consent="googlead">

Setting for raw HTML code in language snippets and service descriptions

Would be great to have an option to define that raw HTML code could be used in language snippets or the service descriptions. This would be a great benefit because it is then possible to provide links to external privacy policies or to the own privacy policy.
Additionally with this another "Learn more" link could be placed in the barMainText snippet.

How block google analytics by google tag manager?

Hello, I am using Google Tag Manager include Google Analytics.

If I accept the consent Google Analytics are available, but after I decline the GA the GA Cookies will not be deleted.

analytics: { // Existing category Unique name // This example shows how to block Google Analytics category: 'tracking', // Type of blocking to apply here. // This depends on the type of script we are trying to block // Can be: dynamic-script, script-tag, wrapped, localcookie type: 'dynamic-script', // Only needed if "type: dynamic-script" // The filter will look for this keyword in inserted scipt tags // and block if match found search: 'analytics', // List of known cookie names or Regular expressions matching // cookie names placed by this service. // These willbe removed from current domain and .domain. cookies: [ { // Known cookie name. name: '_gid', // Expected cookie domain. domain: .foobar.de}, { // Known cookie name. name: '_gcl_aw', // Expected cookie domain. domain:.foobar.de}, { // Regex matching cookie name. name: /^_ga/, domain:.foobar.de}, { // Regex matching cookie name. name: /^__utm/, domain:.foobar.de}, { // Regex matching cookie name. name: /^_g/, domain:.foobar.de } ], language: { locale: { de: { name: 'Google Analytics' } } } }

Consent Settings - Bar main button text color not persisted

This looks like a really good solution for what is a really annoying requirement!

I've noticed that the color selected for the Bar main button text color is not persisted. It returns to black.

The color rendered in the UI is #2C7CBF - the original theme color.

The color-control slider for this property doesn't behave in the same way as the other color-controls, remaining on black as the slider is moved. Clicking on the color pallete changes the selected color and then the slider works, but this selection is not persisted.

Support blocking local storage "cookies"

The Web Storage API supported by modern web browsers describes an alternative interface that JavaScript code can use to store persistent data on users' devices. This API has replaced cookies in several use cases, especially for rich web applications where the server does little processing. However, cookieconsent does not support blocking Web Storage API calls.

According to common interpretations of the Directive 2002/58/EC of the European Parliament and of the Council of 12 July 2002 concerning the processing of personal data and the protection of privacy in the electronic communications sector (Directive on privacy and electronic communications) (usually called "cookie law"), EU regulations are not limited to cookies. Paragraph 24 of that directive reads (emphasis mine):

Terminal equipment of users of electronic communications networks and any information stored on such equipment are part of the private sphere of the users requiring protection under the European Convention for the Protection of Human Rights and Fundamental Freedoms. So-called spyware, web bugs, hidden identifiers and other similar devices can enter the user's terminal without their knowledge in order to gain access to information, to store hidden information or to trace the activities of the user and may seriously intrude upon the privacy of these users. The use of such devices should be allowed only for legitimate purposes, with the knowledge of the users concerned.

Cookies are later mentioned in the directive as an example of information storage devices, but as the Web Storage API can also be used to implement information storage devices, the directive applies to it.

Given the fact that modern web applications are using the Web Storage API, that this repository aims to make it easy to comply with "EU regulation" and that the word "cookie" has been commonly overloaded to vaguely mean "information storage device" in this context, I think it'd be great for this project to support blocking Web Storage API usage 😄

Doesnt block Google Adsense

We are trying to block the google adsense cookie _gcl_au:

adsense: { category: "marketing", type: "dynamic-script", search: "adsense", cookies: [ {name: "_gcl_au", domain: `.${window.location.hostname}`} ], language: {locale: {es: {name: "Google Adsense"}}} },

Other Google cookies as _ga are blocked correctly.

How to handle google tag manager ?

What's the best strategy to handle the google tag manager cookies?

    <script type="text/plain" data-consent="google-tag-manager">
      CookieConsent.wrapper('wrapped', function() {
        console.warn('I\'m a google-tag-manager script which was wrapped.');
        (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new
        Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0];var
        j=d.createElement(s);var
        dl=l!='dataLayer'?'&l='+l:'';j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'';j.async=true;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-XXXXXXX');

      });
    </script>

Also what about the extra iframe one that is included ?

<noscript aria-hidden="true"><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX" height="0" width="0" title="Google Tag Manager"></iframe></noscript>

Deleting local Cookies ie. setting the expiration date to before now should still work even if the cookie is blocked

If i exclude a cookie with a local cookie configuration, it is blocked from being added unless i approve of that category. BUT, if i set the category to disabled again, it SHOULD delete the cookie.

It however does not because deleting a cookie is just another set operation which causes the filter to not set the cookie because i asked it not to. Even when my expiration date is way in the past.

Deleting a cookie should always work, regardless if i want to exclude that cookie or not.

It might be the worst solution possible to the problem, but i had to fix it asap and this was the only thing my monkey brain could think of. It does work, but it is not pretty. There is probably a better solution.

https://i.imgur.com/GaHiSOf.png

mootools conflict?

very nice script.
it works flawlessly in simple sites.
whilst it seems having sort of conflict with mootools, beyond my comprehension & knowledges. :-)
i.e. if i link the scripts like it follows:

<script src="/cookieconsent.js"></script> <script src="/cookieconsent-init.js"></script> <script src="/mootools-core.js"></script> …

i get errors like
TypeError: ({}) is not a function
as if mootools tried to evaluate functions during the "modal" building (in "parseArguments" …?)
and, even if i use a "try…catch" statement to let the script goes to the end, then i get lot of unexpected lines in the categories tab ([Missing language object]), one for each "function" mootools catch.

anyone has a workaround for such weird behavior?

Web Accessibility

Hi there 👋 ,

We are looking at using this package in work but we also fall under the remit of WCAG 2.1 and need to maintain an accessible site. At the moment this package appears to be inaccessible by anyone who isn't a sighted user with a mouse (tested with MacOS voiceover) due to a lack of either semantic HTML or aria-* attributes.

Would you be open to pull requests that address these issues?

How to block Vimeo cookie ?

Hello
How can i block vimeo cookies using this package (cookie vuid) loaded by https://player.vimeo.com ?
I believe this cookie is used by the vimeo video we embed using iframe :

<iframe class="mfp" src="https://player.vimeo.com/video/#videolink?autoplay=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <script src="https://player.vimeo.com/api/player.js"></script>

I have tried 2 ways with below scripts without much success:

vimeo: {
category: 'analytics',
type: 'script-tag',
search: 'vimeo',
language: {
locale: {
en: {
name: 'Vimeo'
}
}
} }

  1. vimeo: {
    category: 'analytics',
    type: 'dynamic-script',
    search: 'vuid',
    cookies: [
    {
    name: 'vuid',
    domain: .vimeo.com
    }
    ],
    language: {
    locale: {
    en: {
    name: 'Vimeo Script'
    }
    }
    }
    },

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.