Skip to content

zerqs/privacyPolicyModal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GDPR / Privacy Policy Modal

  1. About
  2. Install
  3. Contribute

About

Simple Privacy Policy / GDPR Popup

screenshot.png

Install

Download the files

P.S You can download and run the modal as is if you wish to see it in action.

just open index.html with your live server option

Put the files in your project

add the javascript file to your page.


<script src="./privacy-popup/js/privacy.js"></script>

add a div to your page where the modl will live

<div id ="privacyPopup" class="privacy-popup ">

The modal takes two json objects

const gdpr = new GDPR({
    "header": "Cookie Policy",
    "declaration": "This is the declaration under main header",
    "categorys": {
        "Esssential": "essence text",
        "Functionality": "function text",
        "Analytical": "analytical text",
        "Marketing": "marketing text"
    },
}, 'privacyPopup', {
    "storageType": window.localStorage,
    "storageKey": "p_consent",
    "formId": "tos-form",
    "url": "/test/data",
    "method": "POST",
    "mode": "no-cors",
    "credentials": "same-origin",
    "headers": {
        "Content-Type": "application/json"
    }
})

you can add / remove css as you please in the css file

Once configured to your liking you are ready to go

Contribute

Feel free to contribute what ever you like

Constructive criticism is appreciated

About

A simple privacy policy / GDPR modal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published