bootstrap-cookie-consent
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -777,2 +777,4 @@ (function (global, factory) { | ||
var bsn = require("bootstrap.native"); | ||
class BootstrapCookieConsent { | ||
@@ -792,3 +794,3 @@ constructor(conf = {}) { | ||
'method': 1, | ||
// 0: native boostrap, 1:jquery bootstrap | ||
// 0: native boostrap, 1:jquery bootstrap or (string) 'bsn' | ||
services: [], | ||
@@ -817,3 +819,3 @@ services_descr: {} | ||
let modal = document.getElementById('cookie-modal'); | ||
let iModal = new Modal(modal); | ||
let iModal = typeof this._conf.method == 'string' ? new eval(this._conf.method + '.Modal(modal)') : new Modal(modal); | ||
iModal.show(); | ||
@@ -841,3 +843,2 @@ } | ||
document.getElementById(this._conf.accept_id).addEventListener('click', () => { | ||
console.log('event click'); | ||
this.cookieConsent.acceptAll(); | ||
@@ -844,0 +845,0 @@ |
{ | ||
"name": "bootstrap-cookie-consent", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Simple and light Boostrap banner and modal to manage cookies like the cnil advices it (RGPD)", | ||
@@ -5,0 +5,0 @@ "author": "Robin D. <contact@robin-d.fr>", |
@@ -8,2 +8,4 @@ /** | ||
var bsn = require("bootstrap.native"); | ||
class BootstrapCookieConsent | ||
@@ -25,3 +27,3 @@ { | ||
'checkbox_class' : 'switch-sm', | ||
'method' : 1, // 0: native boostrap, 1:jquery bootstrap | ||
'method' : 1, // 0: native boostrap, 1:jquery bootstrap or (string) 'bsn' | ||
services: [], | ||
@@ -55,4 +57,3 @@ services_descr: {} | ||
let modal = document.getElementById('cookie-modal'); | ||
let iModal = new Modal(modal); | ||
let iModal = typeof this._conf.method == 'string' ? new eval(this._conf.method + '.Modal(modal)') : new Modal(modal); | ||
iModal.show(); | ||
@@ -82,3 +83,2 @@ } | ||
document.getElementById(this._conf.accept_id).addEventListener('click', ()=>{ | ||
console.log('event click'); | ||
this.cookieConsent.acceptAll(); | ||
@@ -85,0 +85,0 @@ this._hideBanner(); |
Sorry, the diff of this file is too big to display
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
430042
1378
2