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.1.10 to 1.2.0

2

package.json
{
"name": "cookie-consent-js",
"version": "1.1.10",
"version": "1.2.0",
"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",

@@ -36,8 +36,8 @@ # cookie-consent-js

```js
cookieConsent.isTrackingCookieAllowed()
cookieConsent.trackingAllowed()
```
Use this function to disable tracking.
Suround tracking code, like the Google Analytics code with
Returns `true` if the user did accept tracking cookies.
Use this function to disable tracking. Suround tracking code, like the Google Analytics code with
```js
if(cookieConsent.isTrackingCookieAllowed()) {
if(cookieConsent.trackingAllowed()) {
// Google Analytics code and/or other tracking code

@@ -51,3 +51,3 @@ }

```php
if($_COOKIE['cookie-consent-accept-all'] === 'true') {
if($_COOKIE['cookie-consent-tracking-allowed'] === 'true') {
// do some tracking

@@ -88,3 +88,3 @@ }

modalId: "cookieConsentModal", // this may not be changed
cookieName: "cookie-consent-accept-all" // this may not be changed
cookieName: "cookie-consent-tracking-allowed" // this may not be changed
}

@@ -91,0 +91,0 @@ ```

@@ -37,3 +37,3 @@ /**

modalId: "cookieConsentModal", // this may not be changed
cookieName: "cookie-consent-accept-all" // this may not be changed
cookieName: "cookie-consent-tracking-allowed" // this may not be changed
}

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

this.isTrackingCookieAllowed = function () {
this.trackingAllowed = function () {
return getCookie(this.props.cookieName) === "true"

@@ -145,0 +145,0 @@ }

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