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.4.14 to 1.4.15

2

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

@@ -9,3 +9,3 @@ /**

var self = this
const self = this
this.props = {

@@ -52,3 +52,3 @@ buttonPrimaryClass: "btn btn-primary", // the "accept all" buttons class, only used for styling

}
for (var property in props) {
for (let property in props) {
// noinspection JSUnfilteredForInLoop

@@ -64,9 +64,10 @@ this.props[property] = props[property]

}
var _t = this.props.content[this.lang]
var linkPrivacyPolicy = '<a href="' + this.props.privacyPolicyUrl + '">' + _t.privacyPolicy + '</a>'
var modalClass = "cookie-consent-modal"
const _t = this.props.content[this.lang]
const linkPrivacyPolicy = '<a href="' + this.props.privacyPolicyUrl + '">' + _t.privacyPolicy + '</a>'
let modalClass = "cookie-consent-modal"
if (this.props.blockAccess) {
modalClass += " block-access"
}
this.modalContent = '<div class="' + modalClass + '">' +
this.modalContent = '<!-- cookie banner => https://github.com/shaack/cookie-consent-js -->' +
'<div class="' + modalClass + '">' +
'<div class="modal-content-wrap ' + this.props.position + '">' +

@@ -77,3 +78,3 @@ '<div class="modal-content">' +

'<div class="modal-footer">--footer--</div>' +
'</div></div>'
'</div></div><!-- end cookie-consent.js -->'
this.modalContent = this.modalContent.replace(/--header--/, "<h3 class=\"modal-title\">" + _t.title + "</h3>")

@@ -91,5 +92,5 @@ this.modalContent = this.modalContent.replace(/--body--/,

function setCookie(name, value, days) {
var expires = ""
let expires = ""
if (days) {
var date = new Date()
const date = new Date()
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000))

@@ -102,6 +103,6 @@ expires = "; expires=" + date.toUTCString()

function getCookie(name) {
var nameEQ = name + "="
var ca = document.cookie.split(';')
for (var i = 0; i < ca.length; i++) {
var c = ca[i]
const nameEQ = name + "="
const ca = document.cookie.split(';')
for (let i = 0; i < ca.length; i++) {
let c = ca[i]
while (c.charAt(0) === ' ') {

@@ -108,0 +109,0 @@ c = c.substring(1, c.length)

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