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

cookie-consent-js

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cookie-consent-js - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

package.json
{
"name": "cookie-consent-js",
"version": "1.2.0",
"version": "1.2.1",
"description": "A simple dialog and framework to handle the German and EU law (may 2020) about cookies in a website",

@@ -5,0 +5,0 @@ "main": "src/cookie-consent.js",

@@ -25,2 +25,6 @@ # cookie-consent-js

This framework writes a cookie (it's default name is `cookie-consent-tracking-allowed`)
with the value `true`, if the user has accepted tracking. You can read the value with the JavaScript
API (`cookieConsent.trackingALlowed()`) or from any other language, which can read cookies.
### JavaScript API

@@ -86,4 +90,4 @@

},
modalId: "cookieConsentModal", // this may not be changed
cookieName: "cookie-consent-tracking-allowed" // this may not be changed
cookieName: "cookie-consent-tracking-allowed", // the name of the cookie, the cookie is `true` if tracking was accepted
modalId: "cookieConsentModal" // the id of the modal dialog element
}

@@ -93,3 +97,3 @@ ```

### Disable autoShow
You should disable `autoShowModal` in the privacy policy page to make that page readable.
You should disable `autoShowModal` in the privacy policy page to make _that_ page readable.
```js

@@ -100,3 +104,2 @@ var cookieConsent = new CookieConsent({linkPrivacyPolicy: "privacy-policy.html", autoShowModal: false})

## Styling
See `./src/cookie-consent.scss` and overwrite values as you need in your projects stylesheet.
See `./src/cookie-consent.scss` and overwrite values as you need in your projects stylesheet.

@@ -36,4 +36,4 @@ /**

},
modalId: "cookieConsentModal", // this may not be changed
cookieName: "cookie-consent-tracking-allowed" // this may not be changed
cookieName: "cookie-consent-tracking-allowed", // the name of the cookie, the cookie is `true` if tracking was accepted
modalId: "cookieConsentModal" // the id of the modal dialog element
}

@@ -111,3 +111,3 @@ for (var property in props) {

documentReady(function () {
this.modal = document.getElementById("cookieConsentModal")
this.modal = document.getElementById(self.props.modalId)
if (!this.modal) {

@@ -114,0 +114,0 @@ this.modal = document.createElement("div")

Sorry, the diff of this file is not supported yet

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