Socket
Socket
Sign inDemoInstall

angular-gravatar

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-gravatar - npm Package Compare versions

Comparing version 0.2.2 to 0.2.4

4

bower.json
{
"name": "angular-gravatar",
"version": "0.2.2",
"version": "0.2.4",
"author": {

@@ -24,3 +24,3 @@ "name": "Sebastian Wallin"

"dependencies": {
"angular": "~1.2.x"
"angular": ">=1.0.0 <1.4.0"
},

@@ -27,0 +27,0 @@ "devDependencies": {

@@ -55,3 +55,3 @@ (function() {

v = object[k];
params.push("" + k + "=" + (escape(v)));
params.push("" + k + "=" + (encodeURIComponent(v)));
}

@@ -62,2 +62,3 @@ return params.join('&');

this.secure = false;
this.protocol = null;
this.$get = [

@@ -67,3 +68,3 @@ 'md5', function(md5) {

url: function(src, opts) {
var params, pieces, urlBase;
var params, pieces, prefix, urlBase;
if (src == null) {

@@ -76,3 +77,4 @@ src = '';

opts = angular.extend(angular.copy(self.defaults), opts);
urlBase = self.secure ? 'https://secure' : '//www';
prefix = self.protocol ? self.protocol + ':' : '';
urlBase = self.secure ? 'https://secure' : prefix + '//www';
src = hashRegex.test(src) ? src : md5(src);

@@ -79,0 +81,0 @@ pieces = [urlBase, '.gravatar.com/avatar/', src];

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

(function(){var a;a=function(a){return["gravatarService",function(b){var c;return c=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(d,e,f){var g,h,i,j;g=a?"gravatarSrcOnce":"gravatarSrc",h=f[g],delete f[g],i=c("gravatar",f),j=d.$watch(h,function(c){if(a){if(null==c)return;j()}e.attr("src",b.url(c,i))})}}}]},angular.module("ui.gravatar",["md5"]).provider("gravatarService",function(){var a,b,c;return b=this,a=/^[0-9a-f]{32}$/i,c=function(a){var b,c,d;c=[];for(b in a)d=a[b],c.push(""+b+"="+escape(d));return c.join("&")},this.defaults={},this.secure=!1,this.$get=["md5",function(d){return{url:function(e,f){var g,h,i;return null==e&&(e=""),null==f&&(f={}),f=angular.extend(angular.copy(b.defaults),f),i=b.secure?"https://secure":"//www",e=a.test(e)?e:d(e),h=[i,".gravatar.com/avatar/",e],g=c(f),g.length>0&&h.push("?"+g),h.join("")}}}],this}).directive("gravatarSrc",a()).directive("gravatarSrcOnce",a(!0))}).call(this);
(function(){var a;a=function(a){return["gravatarService",function(b){var c;return c=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(d,e,f){var g,h,i,j;g=a?"gravatarSrcOnce":"gravatarSrc",h=f[g],delete f[g],i=c("gravatar",f),j=d.$watch(h,function(c){if(a){if(null==c)return;j()}e.attr("src",b.url(c,i))})}}}]},angular.module("ui.gravatar",["md5"]).provider("gravatarService",function(){var a,b,c;return b=this,a=/^[0-9a-f]{32}$/i,c=function(a){var b,c,d;c=[];for(b in a)d=a[b],c.push(""+b+"="+encodeURIComponent(d));return c.join("&")},this.defaults={},this.secure=!1,this.protocol=null,this.$get=["md5",function(d){return{url:function(e,f){var g,h,i,j;return null==e&&(e=""),null==f&&(f={}),f=angular.extend(angular.copy(b.defaults),f),i=b.protocol?b.protocol+":":"",j=b.secure?"https://secure":i+"//www",e=a.test(e)?e:d(e),h=[j,".gravatar.com/avatar/",e],g=c(f),g.length>0&&h.push("?"+g),h.join("")}}}],this}).directive("gravatarSrc",a()).directive("gravatarSrcOnce",a(!0))}).call(this);
{
"name": "angular-gravatar",
"version": "0.2.2",
"version": "0.2.4",
"author": {

@@ -5,0 +5,0 @@ "name": "Sebastian Wallin"

@@ -83,2 +83,5 @@ [![Bower version](https://badge.fury.io/bo/angular-gravatar.png)](http://badge.fury.io/bo/angular-gravatar)

gravatarServiceProvider.secure = true;
// Force protocol
gravatarServiceProvider.protocol = 'my-protocol';
}

@@ -90,2 +93,5 @@ ]);

Anyway, you can force the protocol you want (for `https` use `secure = true` instead of `protocol = 'https'` because gravatar url differs for secure/no secure).
For example, if you are developing a mobile app with Cordova you should use `http`. Otherwise directive will use `file` protocol and fail.
All the available options can be seen over at the [Gravatar docs for image

@@ -99,6 +105,7 @@ requests](https://sv.gravatar.com/site/implement/images/)

Contributors
[Contributors](https://github.com/wallin/angular-gravatar/graphs/contributors)
-----
* Alexander Makarenko (https://github.com/estliberitas)
* Eduardo Garcia (https://github.com/thewarpaint)
* Thomas Vervest (https://github.com/tvervest)
* Thomas Vervest (https://github.com/tvervest)
* Gonzalo Aguirre (https://github.com/gaguirre)

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc