Socket
Socket
Sign inDemoInstall

angular-lazytube

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.1 to 0.2.2

2

angular-lazytube.js

@@ -22,3 +22,3 @@ angular.module('oblador.lazytube', [

angular.module("oblador.lazytube.templates", []).run(["$templateCache", function($templateCache) {$templateCache.put("templates/lazytube/directive.html","<div class=\"yt-wrap\" ng-class=\"{\'yt-responsive\' : responsive }\" ng-style=\"wrapperStyle\"><a ng-href=\"http://www.youtube.com/watch?v={{id}}\" ng-click=\"showVideo($event)\" ng-show=\"!active\" ng-style=\"placeholderStyle\" class=\"yt-placeholder\"><i class=\"yt-btn\"></i></a><iframe class=\"yt-embed\" ng-if=\"active\" width=\"{{width}}\" height=\"{{height}}\" ng-src=\"{{embedUrl}}\" frameborder=\"0\" allowfullscreen></iframe></div>");
$templateCache.put("templates/lazytube/styles.html","<style type=\"text/css\">.yt-responsive{position:relative;padding-bottom:56.25%;height:0;overflow:hidden;max-width:100%}.yt-placeholder{display:block;position:relative;background:#000 no-repeat 50% 50%;background-size:cover;margin:4px 0}.yt-responsive .yt-placeholder,.yt-responsive .yt-embed{position:absolute;top:0;left:0;width:100%;height:100%;margin:0}.yt-btn:before{content:\"▶\";color:#fff;font-family:Helvetica,sans-serif}.yt-btn{position:absolute;left:50%;top:50%;width:84px;line-height:58px;margin:-29px 0 0 -42px;font-style:normal;background:#000;background:rgba(0,0,0,.8);text-align:center;font-size:28px;border-radius:10px;text-indent:5px}a:hover .yt-btn{background:#cc181e}</style>");}]);
$templateCache.put("templates/lazytube/styles.html","<style type=\"text/css\">.yt-responsive{position:relative;padding-bottom:56.25%;height:0;overflow:hidden;max-width:100%}.yt-placeholder{display:block;position:relative;background:#000 no-repeat 50% 50%;background-size:cover;margin:4px 0}.yt-responsive .yt-placeholder,.yt-responsive .yt-embed{position:absolute;top:0;left:0;width:100%;height:100%;margin:0}.yt-btn:before{content:\"\\25B6\\FE0E\";color:#fff;font-family:Helvetica,sans-serif}.yt-btn{position:absolute;left:50%;top:50%;width:84px;line-height:58px;margin:-29px 0 0 -42px;font-style:normal;background:#000;background:rgba(0,0,0,.8);text-align:center;font-size:28px;border-radius:10px;text-indent:5px}a:hover .yt-btn{background:#cc181e}</style>");}]);

@@ -25,0 +25,0 @@ angular.module('oblador.lazytube.directive', ['oblador.lazytube.config']).

@@ -1,2 +0,2 @@

angular.module("oblador.lazytube",["oblador.lazytube.templates","oblador.lazytube.config","oblador.lazytube.directive"]),angular.module("oblador.lazytube.config",[]).factory("obLazytubeConfig",function(){return{width:560,height:315,responsive:!0,urlParams:{autoplay:1}}}),angular.module("oblador.lazytube.templates",[]).run(["$templateCache",function(e){e.put("templates/lazytube/directive.html",'<div class="yt-wrap" ng-class="{\'yt-responsive\' : responsive }" ng-style="wrapperStyle"><a ng-href="http://www.youtube.com/watch?v={{id}}" ng-click="showVideo($event)" ng-show="!active" ng-style="placeholderStyle" class="yt-placeholder"><i class="yt-btn"></i></a><iframe class="yt-embed" ng-if="active" width="{{width}}" height="{{height}}" ng-src="{{embedUrl}}" frameborder="0" allowfullscreen></iframe></div>'),e.put("templates/lazytube/styles.html",'<style type="text/css">.yt-responsive{position:relative;padding-bottom:56.25%;height:0;overflow:hidden;max-width:100%}.yt-placeholder{display:block;position:relative;background:#000 no-repeat 50% 50%;background-size:cover;margin:4px 0}.yt-responsive .yt-placeholder,.yt-responsive .yt-embed{position:absolute;top:0;left:0;width:100%;height:100%;margin:0}.yt-btn:before{content:"▶";color:#fff;font-family:Helvetica,sans-serif}.yt-btn{position:absolute;left:50%;top:50%;width:84px;line-height:58px;margin:-29px 0 0 -42px;font-style:normal;background:#000;background:rgba(0,0,0,.8);text-align:center;font-size:28px;border-radius:10px;text-indent:5px}a:hover .yt-btn{background:#cc181e}</style>')}]),angular.module("oblador.lazytube.directive",["oblador.lazytube.config"]).directive("obLazytube",["$sce","$window","$templateCache","obLazytubeConfig",function(e,t,a,o){angular.element(document).find("head").prepend(a.get("templates/lazytube/styles.html"));var l=/^(?:(https?:)?\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,r="autohide autoplay cc_load_policy color controls disablekb enablejsapi end fs iv_load_policy list listType loop modestbranding origin playerapiid playlist playsinline rel showinfo start theme".split(" ");return{restrict:"A",templateUrl:"templates/lazytube/directive.html",replace:!0,transclude:!0,scope:!0,link:function(a,i,n){var s=n.obLazytube;if(!s){var d=n.href||n.src;if(!d||!d.match(l))return;s=RegExp.$2}a.id=s;var p="https:"===t.location.protocol?"https:":"http:",c=a.width=i.attr("width")||o.width,u=a.height=i.attr("height")||o.height,h=a.responsive=angular.isDefined(n.noResponsive)?!1:o.responsive;a.wrapperStyle={},a.placeholderStyle={backgroundImage:n.obPlaceholder?"url("+n.obPlaceholder+")":"url("+p+"//i.ytimg.com/vi/"+s+"/hqdefault.jpg)"},h?a.wrapperStyle.paddingBottom=100*u/c+"%":(a.placeholderStyle.width=c+"px",a.placeholderStyle.height=u+"px"),a.showVideo=function(t){var l=angular.copy(o.urlParams);angular.forEach(r,function(e){var t=n[e];angular.isDefined(t)&&(l[e]=t)});var i=[];angular.forEach(l,function(e,t){i.push(t+"="+encodeURIComponent(e))}),a.embedUrl=e.trustAsResourceUrl(p+"//www.youtube.com/embed/"+s+"/?"+i.join("&")),a.active=!0,t.preventDefault()}}}}]);
angular.module("oblador.lazytube",["oblador.lazytube.templates","oblador.lazytube.config","oblador.lazytube.directive"]),angular.module("oblador.lazytube.config",[]).factory("obLazytubeConfig",function(){return{width:560,height:315,responsive:!0,urlParams:{autoplay:1}}}),angular.module("oblador.lazytube.templates",[]).run(["$templateCache",function(e){e.put("templates/lazytube/directive.html",'<div class="yt-wrap" ng-class="{\'yt-responsive\' : responsive }" ng-style="wrapperStyle"><a ng-href="http://www.youtube.com/watch?v={{id}}" ng-click="showVideo($event)" ng-show="!active" ng-style="placeholderStyle" class="yt-placeholder"><i class="yt-btn"></i></a><iframe class="yt-embed" ng-if="active" width="{{width}}" height="{{height}}" ng-src="{{embedUrl}}" frameborder="0" allowfullscreen></iframe></div>'),e.put("templates/lazytube/styles.html",'<style type="text/css">.yt-responsive{position:relative;padding-bottom:56.25%;height:0;overflow:hidden;max-width:100%}.yt-placeholder{display:block;position:relative;background:#000 no-repeat 50% 50%;background-size:cover;margin:4px 0}.yt-responsive .yt-placeholder,.yt-responsive .yt-embed{position:absolute;top:0;left:0;width:100%;height:100%;margin:0}.yt-btn:before{content:"\\25B6\\FE0E";color:#fff;font-family:Helvetica,sans-serif}.yt-btn{position:absolute;left:50%;top:50%;width:84px;line-height:58px;margin:-29px 0 0 -42px;font-style:normal;background:#000;background:rgba(0,0,0,.8);text-align:center;font-size:28px;border-radius:10px;text-indent:5px}a:hover .yt-btn{background:#cc181e}</style>')}]),angular.module("oblador.lazytube.directive",["oblador.lazytube.config"]).directive("obLazytube",["$sce","$window","$templateCache","obLazytubeConfig",function(e,t,a,o){angular.element(document).find("head").prepend(a.get("templates/lazytube/styles.html"));var l=/^(?:(https?:)?\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,r="autohide autoplay cc_load_policy color controls disablekb enablejsapi end fs iv_load_policy list listType loop modestbranding origin playerapiid playlist playsinline rel showinfo start theme".split(" ");return{restrict:"A",templateUrl:"templates/lazytube/directive.html",replace:!0,transclude:!0,scope:!0,link:function(a,i,n){var s=n.obLazytube;if(!s){var d=n.href||n.src;if(!d||!d.match(l))return;s=RegExp.$2}a.id=s;var p="https:"===t.location.protocol?"https:":"http:",c=a.width=i.attr("width")||o.width,u=a.height=i.attr("height")||o.height,h=a.responsive=angular.isDefined(n.noResponsive)?!1:o.responsive;a.wrapperStyle={},a.placeholderStyle={backgroundImage:n.obPlaceholder?"url("+n.obPlaceholder+")":"url("+p+"//i.ytimg.com/vi/"+s+"/hqdefault.jpg)"},h?a.wrapperStyle.paddingBottom=100*u/c+"%":(a.placeholderStyle.width=c+"px",a.placeholderStyle.height=u+"px"),a.showVideo=function(t){var l=angular.copy(o.urlParams);angular.forEach(r,function(e){var t=n[e];angular.isDefined(t)&&(l[e]=t)});var i=[];angular.forEach(l,function(e,t){i.push(t+"="+encodeURIComponent(e))}),a.embedUrl=e.trustAsResourceUrl(p+"//www.youtube.com/embed/"+s+"/?"+i.join("&")),a.active=!0,t.preventDefault()}}}}]);
//# sourceMappingURL=angular-lazytube.min.js.map
{
"name": "angular-lazytube",
"version": "0.2.1",
"version": "0.2.2",
"description": "Lazy loading youtube videos with angular",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc