MCPcopy Index your code
hub / github.com/osano/cookieconsent

github.com/osano/cookieconsent @3.1.1

repository ↗ · DeepWiki ↗ · release 3.1.1 ↗ · Ask this repo → · + Follow
25 symbols 30 edges 3 files 0 documented · 0% updated 2y ago3.1.1 · 2019-05-23★ 3,557
README

Build Status

What is Cookie Consent?

Cookie Consent is a lightweight JavaScript plugin for alerting users about the use of cookies on your website.

It is designed to help you comply with the hideous EU Cookie Law and not make you want to kill yourself in the process. So we made it fast, free, and relatively painless.

Warning: Phishing attempt

Several users have been emailed with a phishing attempt trying to get them to move the URL they link to from the cdnjs link that is provided on our website as cdnjs is "going away". This is not associated with us and will most likely result in malicious sideloaded code on your website.

Version 3.0

Version 3.0 is a complete rewrite from version 2. The most substantial new features are:

  • the ability to GeoLocate and only show the addon to people in the relevant countries
  • callback hooks for showing/accepting/revoking the banner
  • support for different types of compliance, giving you the flexibility to obey even the strictest cookie laws
  • easy no-fuss themes and customisable styles

Installation

The easiest way to get up and running is to use our wizard.

You can also install this project through npm:

npm install cookieconsent

Or through Bower:

bower install cookieconsent

Or via a jsDelivr:

<script src="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.js"></script>

Documentation

See our full documentation.

Contributing

Feel free to improve the plugin and send us a pull request.

The easiest way to develop is to host the files with a local webserver. e.g.

python -m SimpleHTTPServer

We use Gulp to compile the SCSS and minify the JavaScript. You can run a build with:

gulp build

License

Code released under the MIT licence.

Credits

Cookie Consent v3

  • Alex Morley-Finch (@alexmorleyfinch) - JavaScript
  • Piiu Pilt - JavaScript
  • Oliver Emberton (@oliveremberton) - a couple of lines of CSS, maybe

Cookie Consent v2

  • David Ball (@drball) - CSS / themes
  • Adam Hutchinson (@adjohu) - JavaScript

Core symbols most depended-on inside this repo

toError
called by 6
src/cookieconsent.js
arrayContainsMatches
called by 2
src/cookieconsent.js
addCustomStyle
called by 1
src/cookieconsent.js
getHoverColour
called by 1
src/cookieconsent.js
removeCustomStyle
called by 1
src/cookieconsent.js
CookiePopup
called by 0
src/cookieconsent.js
afterFadeIn
called by 0
src/cookieconsent.js
afterFadeOut
called by 0
src/cookieconsent.js

Shape

Function 25

Languages

TypeScript100%

Modules by API surface

src/cookieconsent.js23 symbols
examples/script.js2 symbols

Dependencies from manifests, versioned

autoprefixer9.5.1 · 1×
del4.1.1 · 1×
gulp4.0.2 · 1×
gulp-autoprefixer6.1.0 · 1×
gulp-bump2.4.0 · 1×
gulp-clean-css4.2.0 · 1×
gulp-cli2.2.0 · 1×
gulp-concat2.6.1 · 1×
gulp-diff-44.0.1 · 1×
gulp-terser1.2.0 · 1×
yargs13.2.4 · 1×

For agents

$ claude mcp add cookieconsent \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact