New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eurocookie-js

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eurocookie-js

eurocookie-js is a full, yet simple to use, library to request consent for cookies

  • 2.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

eurocookie-js

Join the chat at https://gitter.im/AdrianArroyoCalle/eurocookie-js

eurocookie-js is a full, yet simple to use, library to request consent for cookies. It doesn't allow cookies until consent is granted. It also comes with the translated messages prepared to be shown to the users.

Features

  • Block cookies before consent accept
  • Multilanguage
  • No dependencies
  • Remembers consent

Using npm + browserify

Install with npm

npm install eurocookie-js --save

If you need to install the cookies import the module and call euroCookie

var ec=require("eurocookie-js");
ec.euroCookie("http://link-to-privacy-policy.com");

It will load all script tags with the class cookielike this

<script type="text/plain" class="cookie">
 //CALLING GOOGLE ANALYTICS
 ga.push(); ....
</script>

Remember that you must set the script type to "text/plain" to prevent the execution

Using script tag

eurocookie-js can also be used with a simple script tag. Put it at the very end of the HTML file.

  <script type="text/plain" class="cookie">
  console.log("We have cookie consent here");
  </script>
  <script src="eurocookie-js/index.js"></script>
  <script>
  euroCookie("http://link-to-privacy-policy.com");
  </script>
</body>
</html>

Using Bower

bower install eurocookie-js --save

And remember to put the correct path destination

<script src="bower_components/eurocookie-js/index.js"></script>

Keywords

FAQs

Package last updated on 17 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc