0.0.5 • Published 6 years ago

embed-consent v0.0.5

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

Embed Consent

postpone embed loading until user gives consent

Installation

npm install embed-consent

Usage

<article class="js-embed" data-embed-src="https://www.youtube.com/embed/flLc6LmAG6c">
  Please confirm you like to load this YouTube video:
  <button class="js-embed__opener">Okay</button>
</article>

The data-embed-id attribute can be used to set a cookie if the user gives consent. After that the embed permission request won't show itself for the next 90 days.

import EmbedConsent from 'embed-consent'

const embed = new EmbedConsent()
embed.enable()

npm

0.0.5

6 years ago

0.1.0

6 years ago

0.0.4

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago