2017 © Pedro Peláez
 

library avg-safe-iframes

Fix iframe elements in order to comply to AVG

image

swisnl/avg-safe-iframes

Fix iframe elements in order to comply to AVG

  • Monday, May 28, 2018
  • by swisnl
  • Repository
  • 0 Watchers
  • 0 Stars
  • 157 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 685 % Grown

The README.md

SWIS Iframe-fixer for GDPR (AVG)

Run Status Coverage Badge, (*1)

This package will look for <iframe>-elements in a HTML-snippet, and "fix" it in order to play nicely with our cookiebar., (*2)

Install

composer require swisnl/avg-safe-iframes, (*3)

What it does

  1. Replace the src-attribute with data-src (so the iframe won't load right away)
  2. Adds a class to the element (cookie-settings-*), so the cookiebar knows if it complies with the users preferences. The default class is for tracking-cookies.

How to use it

Via the class:, (*4)

$avgSafeIframe = new \Swis\AvgSafeIframes\AvgSafeIframes();

$text = '

'; return $avgSafeIframe->fix($text); //

Via the helper (in a blade-template, for example):, (*5)

{!! safeAvgIframes($text) !!}

In both scenario's, you could provide a second parameter to add a different class. Please use one of the AvgSafeIframes::MODE*_ constants:, (*6)

  • MODE_TRACKING
  • MODE_STATS
  • MODE_STATS_AND_TRACKING

Todo

  • Add a (Laravel) middleware so you won't have to manually use the helper

The Versions

28/05 2018

dev-master

9999999-dev https://bitbucket.org/swisnl/avg-safe-iframes

Fix iframe elements in order to comply to AVG

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

swisnl avg-safe-iframes

28/05 2018

1.0.0

1.0.0.0 https://bitbucket.org/swisnl/avg-safe-iframes

Fix iframe elements in order to comply to AVG

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

swisnl avg-safe-iframes

28/05 2018

0.1.2

0.1.2.0 https://bitbucket.org/swisnl/avg-safe-iframes

Fix iframe elements in order to comply to AVG

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

swisnl avg-safe-iframes

28/05 2018

0.1.1

0.1.1.0 https://bitbucket.org/swisnl/avg-safe-iframes

Fix iframe elements in order to comply to AVG

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

swisnl avg-safe-iframes

28/05 2018

0.1.0

0.1.0.0 https://github.com/swisnl/laravel-static-request-cache

Fix iframe elements in order to comply to AVG

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

swisnl avg-safe-iframes