angular-gravatar
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "angular-gravatar", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"author": { | ||
@@ -24,6 +24,6 @@ "name": "Sebastian Wallin" | ||
"dependencies": { | ||
"angular": "~1.x" | ||
"angular": "~1.2.x" | ||
}, | ||
"devDependencies": { | ||
"angular-mocks": "~1.0.x" | ||
"angular-mocks": "~1.2.x" | ||
}, | ||
@@ -30,0 +30,0 @@ "repository": { |
@@ -13,2 +13,5 @@ 'use strict'; | ||
var k, params, pieces, urlBase, v; | ||
if (src == null) { | ||
src = ''; | ||
} | ||
if (opts == null) { | ||
@@ -62,5 +65,2 @@ opts = {}; | ||
return scope.$watch(attrs.gravatarSrc, function(src) { | ||
if (src == null) { | ||
return; | ||
} | ||
return element.attr('src', gravatarService.url(src, opts)); | ||
@@ -67,0 +67,0 @@ }); |
@@ -1,1 +0,1 @@ | ||
"use strict";angular.module("ui.gravatar",["md5"]).provider("gravatarService",function(){var a,b;return b=this,a=/^[0-9a-f]{32}$/i,this.defaults={},this.secure=!1,this.$get=["md5",function(c){return{url:function(d,e){var f,g,h,i,j;return null==e&&(e={}),e=angular.extend(angular.copy(b.defaults),e),i=b.secure?"https://secure":"http://www",h=[i,".gravatar.com/avatar/",a.test(d)?d:c(d)],g=function(){var a;a=[];for(f in e)j=e[f],a.push(""+f+"="+escape(j));return a}().join("&"),g.length>0&&h.push("?"+g),h.join("")}}}],this}).directive("gravatarSrc",["gravatarService",function(a){var b;return b=function(a,b){var c,d,e;d={};for(c in b)e=b[c],0===c.indexOf(a)&&(c=c.substr(a.length).toLowerCase(),c.length>0&&(d[c]=e));return d},{restrict:"A",link:function(c,d,e){var f;return f=b("gravatar",e),delete f.src,c.$watch(e.gravatarSrc,function(b){return null!=b?d.attr("src",a.url(b,f)):void 0})}}}]); | ||
"use strict";angular.module("ui.gravatar",["md5"]).provider("gravatarService",function(){var a,b;return b=this,a=/^[0-9a-f]{32}$/i,this.defaults={},this.secure=!1,this.$get=["md5",function(c){return{url:function(d,e){var f,g,h,i,j;return null==d&&(d=""),null==e&&(e={}),e=angular.extend(angular.copy(b.defaults),e),i=b.secure?"https://secure":"http://www",h=[i,".gravatar.com/avatar/",a.test(d)?d:c(d)],g=function(){var a;a=[];for(f in e)j=e[f],a.push(""+f+"="+escape(j));return a}().join("&"),g.length>0&&h.push("?"+g),h.join("")}}}],this}).directive("gravatarSrc",["gravatarService",function(a){var b;return b=function(a,b){var c,d,e;d={};for(c in b)e=b[c],0===c.indexOf(a)&&(c=c.substr(a.length).toLowerCase(),c.length>0&&(d[c]=e));return d},{restrict:"A",link:function(c,d,e){var f;return f=b("gravatar",e),delete f.src,c.$watch(e.gravatarSrc,function(b){return d.attr("src",a.url(b,f))})}}}]); |
{ | ||
"name": "angular-gravatar", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "Sebastian Wallin" |
[![Build Status](https://travis-ci.org/wallin/angular-gravatar.png?branch=master)](https://travis-ci.org/wallin/angular-gravatar) | ||
[![Bower version](https://badge.fury.io/bo/angular-gravatar.png)](http://badge.fury.io/bo/angular-gravatar) | ||
[![NPM version](https://badge.fury.io/js/angular-gravatar.png)](http://badge.fury.io/js/angular-gravatar) | ||
@@ -23,2 +24,9 @@ angular-gravatar | ||
Install with NPM | ||
----- | ||
``` | ||
npm install angular-gravatar | ||
``` | ||
Usage | ||
@@ -29,3 +37,3 @@ ----- | ||
```html | ||
<script src="components/angular-gravatar/src/md5.js"></script> | ||
<script src="components/angular-gravatar/build/md5.js"></script> | ||
<script src="components/angular-gravatar/build/angular-gravatar.js"></script> | ||
@@ -32,0 +40,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42436
88