Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 878 Bytes

README.md

File metadata and controls

23 lines (15 loc) · 878 Bytes

cookie-law-banner

Extremely simple and highly customisable vanilla JavaScript script to create a banner that warns the users that the website uses cookies.

When the user accepts a specific cookie is set on the browser.

The script can be used on any website, just add this code to the bottom of the body:

<script src="cookie-js.js"></script>

At the top of the script it is possible to change:

  • Banner text
  • Buttons text
  • URL of the webpage with the cookies description
  • Position of the banner (top/bottom)
  • Possibility to accept clicking via a link or scrolling the page

The script must run on a server otherwise the cookie is not set up

See an example here: http://codepen.io/vanni/pen/zZoxdY

License