diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..d9426ea --- /dev/null +++ b/composer.json @@ -0,0 +1,15 @@ +{ + "name" : "michaelzangl/wp-video-embed-privacy", + "description": "Wordpress plugin for making ebedding videos GDPR compliant", + "homepage" : "https://wordpress.org/plugins/video-embed-privacy/", + "type" : "wordpress-plugin", + "license" : "GPL-2.0+", + "authors" : [ + { + "name" : "Michael Zangl" + } + ], + "require": { + "composer/installers": "~1.0" + } +} diff --git a/video-embed-privacy.css b/video-embed-privacy.css index 0256e91..0580c36 100644 --- a/video-embed-privacy.css +++ b/video-embed-privacy.css @@ -45,10 +45,16 @@ left: 50%; top: -35px; background: black; - border-radius: 5px; + border-radius: 10px; + opacity: .7; } .video-wrapped.video-wrapped-video:hover .video-wrapped-play:before { - box-shadow: 0 0 5px rgba(0, 0, 0, .3); + box-shadow: 0 0 5px rgba(0, 0, 0, .3); + opacity: 1; +} + +.video-wrapped.video-wrapped-video:hover .video-wrapped-play:after { + opacity: 1; } .video-wrapped.video-wrapped-yt .video-wrapped-play:before { @@ -62,16 +68,17 @@ .video-wrapped.video-wrapped-video .video-wrapped-play:after { content: ''; border-style: solid; - border-width: 17px 0 17px 35px; + border-width: 12px 0 12px 24px; border-color: transparent transparent transparent white; position: absolute; width: 0; height: 0; - margin-left: -15px; + margin-left: -11px; left: 50%; - top: -27px; + top: -22px; + opacity: .7; } .video-wrapped .video-wrapped-play .small { font-size: 50%; -} \ No newline at end of file +} diff --git a/video-embed-privacy.js b/video-embed-privacy.js index 4972fef..ed6eeae 100644 --- a/video-embed-privacy.js +++ b/video-embed-privacy.js @@ -1,11 +1,15 @@ +(function($) { -jQuery(function() { - jQuery(".video-wrapped").each(function() { - jQuery(this) + $.fn.videoEmbedPrivacy = function() { + $(this) .empty() - .append(jQuery('