Coder Social home page Coder Social logo

b3none / gdprconsent Goto Github PK

View Code? Open in Web Editor NEW
9.0 4.0 0.0 274 KB

A super flexible GDPR compliance / GDPR consent solution which, if implemented correctly, will make your site GDPR compliant.

Home Page: https://github.com/b3none

License: MIT License

JavaScript 92.74% SCSS 7.26%
gdpr gdprconsent gdpr-consent gdpr-plugin

gdprconsent's Introduction

GDPR Consent

A super flexible GDPR consent solution that, if implemented correctly, will make your site GDPR compliant.

What can you tell me about GDPR? This blog post does an exceptional job at explaining it.

User Disclaimer

The current version, 1.0.0, is the initial proof of concept and is subject to substantial change. As such we recommend that you watch the repository for releases:

Watch for releases

Installation

To install this project you will need to include the following code before all other scripts get loaded. If you do not do this then your site will not be able to be fully GDPR compliant as we cannot prevent other scripts from executing.

<!-- GDPR Consent -->
<script>
    // TODO: Implement config:
    // https://github.com/b3none/gdprconsent#customisable-settings
    window.gdprconsent = {};
</script>
<script src="https://cdn.jsdelivr.net/gh/b3none/[email protected]/build/scripts/gdprconsent.min.js"></script>

<!-- Other scripts below this point -->

You should also include our default stylesheet using the following snippet:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/b3none/[email protected]/build/styles/gdprconsent.min.css" />

OR

If the use of CDNs really isn't your style then please download the latest release and replace the CDN urls with your own hosted version.

Customisable settings

This project allows you to specify custom settings. To declare these settings you need to put a script tag above the library include containing the following:

<script>
  window.gdprconsent = {
    services: [
      {
        storage_key: '<ANY_KEY_YOU_WANT>',
        title: '<TITLE_IN_SIDEBAR>',
        disable: function() {
          // Callback used to disable the functionality
        },
        enable: function() {
          // Callback to enable the functionality
        },
      }
    ]
  };
</script>

Contributions

We're happy to accept contributions so long as you're open to constructive criticism! Nobody is perfect!

Versioning

We use SemVer. For the versions available, see the tags on this repository.

Authors

  • Alex Blackham - Developer and Maintainer - B3none

See also the list of contributors who participated in this project.

Share the love

If you appreciate the project then please take the time to star our repository.

Star us

License

This project is licensed under the MIT License - see the project license file for details

gdprconsent's People

Contributors

b3none avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gdprconsent's Issues

Smaller package size

Using React, the gzipped package size is approx 30kb. This isn't too bad, but for a plugin that is designed to be included on any page ad hoc, it seems a little excessive. Although not super bad. Most PNGs are worse than that.

I recommend using Preact, as it's a lightweight alternative that when gzipped is approx 4kb. It contains all the core functionality you require with React, just smaller, and a little more verbose in some places.

This is more appropriate for a website plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.