Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-duoshuo

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-duoshuo - npm Package Compare versions

Comparing version 0.4.4 to 0.4.5

2

bower.json
{
"name": "duoshuo",
"version": "0.4.4",
"version": "0.4.5",
"authors": [

@@ -5,0 +5,0 @@ "turing <o.u.turing@gmail.com>"

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

(function(angular,NProgress){"use strict";if(!angular)throw new Error("angular.js required!");var NProgressExist=NProgress&&NProgress.start&&NProgress.done;angular.module("duoshuo",[]).service("$duoshuo",function($rootScope){var self=this;angular.forEach(["get","post","ajax"],function(method){self[method]=function(endpoint,data,callback,errorCallback,skipCheck){if(!window.DUOSHUO)throw new Error("duoshuo embed.js required!");var API=window.DUOSHUO.API;if(!API)throw new Error("duoshuo embed.js must be unstable version!");if(NProgressExist)NProgress.start();return API[method](endpoint,data,function(result){if(NProgressExist)NProgress.done();callback(result.code===0?null:new Error(result.code+" "+result.errorMessage),result.response,result);if(!skipCheck)$rootScope.$apply();return},function(err){if(NProgressExist)NProgress.done();if(errorCallback&&typeof errorCallback==="function"){return errorCallback(err)}return})}});this.on=function(eve,callback,skipCheck){if(["reset","ready"].indexOf(eve)===0)return callback(new Error("event not found"));var e=eve;if(e==="ready")e="reset";return window.DUOSHUO.visitor.on(e,function(){var self=this;var data=this.data;callback(null,data,self);if(!skipCheck)$rootScope.$apply();return})};this.render=function(attrs){if(!window.DUOSHUO)throw new Error("duoshuo embed.js required!");var data={};if(attrs.threadId)data["thread-id"]=attrs.threadId;if(attrs.threadKey)data["thread-key"]=attrs.threadKey;return window.DUOSHUO.createEmbedThread("div",data)}}).directive("duoshuo",function($duoshuo){return{restrict:"AE",replace:true,template:'<div class="ds-thread"></div>',link:function(scope,element,attrs){angular.element(element[0]).append($duoshuo.render(attrs))}}})})(window.angular,window.NProgress);
(function(angular,NProgress){"use strict";if(!angular)throw new Error("angular.js required!");var NProgressExist=NProgress&&NProgress.start&&NProgress.done;angular.module("duoshuo",[]).service("$duoshuo",function($rootScope){var self=this;angular.forEach(["get","post","ajax"],function(method){self[method]=function(endpoint,data,callback,errorCallback,skipCheck){if(!window.DUOSHUO)throw new Error("duoshuo embed.js required!");var API=window.DUOSHUO.API;if(!API)throw new Error("duoshuo embed.js must be unstable version!");if(NProgressExist)NProgress.start();return API[method](endpoint,data,function(result){if(NProgressExist)NProgress.done();callback(result.code===0?null:new Error(result.code+" "+result.errorMessage),result.response,result);if(!skipCheck)$rootScope.$apply();return},function(err){if(NProgressExist)NProgress.done();if(errorCallback&&typeof errorCallback==="function"){return errorCallback(err)}return})}});this.on=function(eve,callback,skipCheck){if(["reset","ready"].indexOf(eve)===0)return callback(new Error("event not found"));var e=eve;if(e==="ready")e="reset";return window.DUOSHUO.visitor.on(e,function(){var self=this;var data=this.data;callback(null,data,self);if(!skipCheck)$rootScope.$apply();return})};this.render=function(attrs){if(!window.DUOSHUO)throw new Error("duoshuo embed.js required!");var data={};if(attrs.threadId)data["thread-id"]=attrs.threadId;if(attrs.threadKey)data["thread-key"]=attrs.threadKey;return window.DUOSHUO.createEmbedThread("div",data)}}).directive("duoshuo",function($duoshuo){return{restrict:"AE",replace:true,template:'<div class="ds-thread-wrapper"></div>',link:function(scope,element,attrs){angular.element(document).ready(function(){angular.element(element[0]).append($duoshuo.render(attrs))})}}})})(window.angular,window.NProgress);
//# sourceMappingURL=duoshuo.min.js.map
{
"name": "angular-duoshuo",
"version": "0.4.4",
"version": "0.4.5",
"description": "a duoshuo SDK for angular.js, pure front-end, cross-domain request supported.",

@@ -5,0 +5,0 @@ "main": "dist/duoshuo.min.js",

@@ -66,7 +66,10 @@ ;(function(angular, NProgress) {

replace: true,
template: '<div class="ds-thread"></div>',
template: '<div class="ds-thread-wrapper"></div>',
link: function(scope, element, attrs) {
// render comments when dom has been injected.
angular.element(element[0])
.append($duoshuo.render(attrs));
angular.element(document).ready(function() {
// fired after dom ready
angular.element(element[0])
.append($duoshuo.render(attrs));
});
}

@@ -73,0 +76,0 @@ };

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