lg-share
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "lg-share", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Social media share module for lightgallery.", | ||
@@ -5,0 +5,0 @@ "main": [ |
@@ -1,2 +0,2 @@ | ||
/*! lg-share - v1.0.0 - 2016-09-20 | ||
/*! lg-share - v1.0.1 - 2016-09-30 | ||
* http://sachinchoolur.github.io/lightGallery | ||
@@ -8,4 +8,4 @@ * Copyright (c) 2016 Sachin N; Licensed GPLv3 */ | ||
// AMD. Register as an anonymous module unless amdModuleId is set | ||
define([], function () { | ||
return (factory()); | ||
define(['jquery'], function (a0) { | ||
return (factory(a0)); | ||
}); | ||
@@ -16,9 +16,9 @@ } else if (typeof exports === 'object') { | ||
// like Node. | ||
module.exports = factory(); | ||
module.exports = factory(require('jquery')); | ||
} else { | ||
factory(); | ||
factory(jQuery); | ||
} | ||
}(this, function () { | ||
}(this, function ($) { | ||
(function($, window, document, undefined) { | ||
(function() { | ||
@@ -90,3 +90,3 @@ 'use strict'; | ||
})(jQuery, window, document); | ||
})(); | ||
@@ -93,0 +93,0 @@ |
@@ -1,4 +0,4 @@ | ||
/*! lg-share - v1.0.0 - 2016-09-20 | ||
/*! lg-share - v1.0.1 - 2016-09-30 | ||
* http://sachinchoolur.github.io/lightGallery | ||
* Copyright (c) 2016 Sachin N; Licensed GPLv3 */ | ||
!function(a,b){"function"==typeof define&&define.amd?define([],function(){return b()}):"object"==typeof exports?module.exports=b():b()}(this,function(){!function(a,b,c,d){"use strict";var e={share:!0,facebook:!0,facebookDropdownText:"Facebook",twitter:!0,twitterDropdownText:"Twitter",googlePlus:!0,googlePlusDropdownText:"GooglePlus",pinterest:!0,pinterestDropdownText:"Pinterest"},f=function(b){return this.core=a(b).data("lightGallery"),this.core.s=a.extend({},e,this.core.s),this.init(),this};f.prototype.init=function(){var c=this,d='<span id="lg-share" class="lg-icon"><ul class="lg-dropdown" style="position: absolute;">';d+=c.core.s.facebook?'<li><a id="lg-share-facebook" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.facebookDropdownText+"</span></a></li>":"",d+=c.core.s.twitter?'<li><a id="lg-share-twitter" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.twitterDropdownText+"</span></a></li>":"",d+=c.core.s.googlePlus?'<li><a id="lg-share-googleplus" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.googlePlusDropdownText+"</span></a></li>":"",d+=c.core.s.pinterest?'<li><a id="lg-share-pinterest" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.pinterestDropdownText+"</span></a></li>":"",d+="</ul></span>",this.core.$outer.find(".lg-toolbar").append(d),this.core.$outer.find(".lg").append('<div id="lg-dropdown-overlay"></div>'),a("#lg-share").on("click.lg",function(){c.core.$outer.toggleClass("lg-dropdown-active")}),a("#lg-dropdown-overlay").on("click.lg",function(){c.core.$outer.removeClass("lg-dropdown-active")}),c.core.$el.on("onAfterSlide.lg.tm",function(d,e,f){setTimeout(function(){a("#lg-share-facebook").attr("href","https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(c.core.$items.eq(f).attr("data-facebook-share-url")||b.location.href)),a("#lg-share-twitter").attr("href","https://twitter.com/intent/tweet?text="+c.core.$items.eq(f).attr("data-tweet-text")+"&url="+encodeURIComponent(c.core.$items.eq(f).attr("data-twitter-share-url")||b.location.href)),a("#lg-share-googleplus").attr("href","https://plus.google.com/share?url="+encodeURIComponent(c.core.$items.eq(f).attr("data-googleplus-share-url")||b.location.href)),a("#lg-share-pinterest").attr("href","http://www.pinterest.com/pin/create/button/?url="+encodeURIComponent(c.core.$items.eq(f).attr("data-pinterest-share-url")||b.location.href)+"&media="+encodeURIComponent(c.core.$items.eq(f).attr("href")||c.core.$items.eq(f).attr("data-src"))+"&description="+c.core.$items.eq(f).attr("data-pinterest-text"))},100)})},f.prototype.destroy=function(){},a.fn.lightGallery.modules.share=f}(jQuery,window,document)}); | ||
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(){"use strict";var b={share:!0,facebook:!0,facebookDropdownText:"Facebook",twitter:!0,twitterDropdownText:"Twitter",googlePlus:!0,googlePlusDropdownText:"GooglePlus",pinterest:!0,pinterestDropdownText:"Pinterest"},c=function(c){return this.core=a(c).data("lightGallery"),this.core.s=a.extend({},b,this.core.s),this.init(),this};c.prototype.init=function(){var b=this,c='<span id="lg-share" class="lg-icon"><ul class="lg-dropdown" style="position: absolute;">';c+=b.core.s.facebook?'<li><a id="lg-share-facebook" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.facebookDropdownText+"</span></a></li>":"",c+=b.core.s.twitter?'<li><a id="lg-share-twitter" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.twitterDropdownText+"</span></a></li>":"",c+=b.core.s.googlePlus?'<li><a id="lg-share-googleplus" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.googlePlusDropdownText+"</span></a></li>":"",c+=b.core.s.pinterest?'<li><a id="lg-share-pinterest" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.pinterestDropdownText+"</span></a></li>":"",c+="</ul></span>",this.core.$outer.find(".lg-toolbar").append(c),this.core.$outer.find(".lg").append('<div id="lg-dropdown-overlay"></div>'),a("#lg-share").on("click.lg",function(){b.core.$outer.toggleClass("lg-dropdown-active")}),a("#lg-dropdown-overlay").on("click.lg",function(){b.core.$outer.removeClass("lg-dropdown-active")}),b.core.$el.on("onAfterSlide.lg.tm",function(c,d,e){setTimeout(function(){a("#lg-share-facebook").attr("href","https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(b.core.$items.eq(e).attr("data-facebook-share-url")||window.location.href)),a("#lg-share-twitter").attr("href","https://twitter.com/intent/tweet?text="+b.core.$items.eq(e).attr("data-tweet-text")+"&url="+encodeURIComponent(b.core.$items.eq(e).attr("data-twitter-share-url")||window.location.href)),a("#lg-share-googleplus").attr("href","https://plus.google.com/share?url="+encodeURIComponent(b.core.$items.eq(e).attr("data-googleplus-share-url")||window.location.href)),a("#lg-share-pinterest").attr("href","http://www.pinterest.com/pin/create/button/?url="+encodeURIComponent(b.core.$items.eq(e).attr("data-pinterest-share-url")||window.location.href)+"&media="+encodeURIComponent(b.core.$items.eq(e).attr("href")||b.core.$items.eq(e).attr("data-src"))+"&description="+b.core.$items.eq(e).attr("data-pinterest-text"))},100)})},c.prototype.destroy=function(){},a.fn.lightGallery.modules.share=c}()}); |
@@ -31,3 +31,30 @@ 'use strict'; | ||
src: 'src/<%= pkg.name %>.js', | ||
dest: 'dist/<%= pkg.name %>.js' | ||
dest: 'dist/<%= pkg.name %>.js', | ||
deps: { | ||
args : ['$'], | ||
'default': ['$'], | ||
amd: { | ||
indent: 6, | ||
items: ['jquery'], | ||
prefix: '\'', | ||
separator: ',\n', | ||
suffix: '\'' | ||
}, | ||
cjs: { | ||
indent: 6, | ||
items: ['jquery'], | ||
prefix: 'require(\'', | ||
separator: ',\n', | ||
suffix: '\')' | ||
}, | ||
global: { | ||
items: ['jQuery'], | ||
}, | ||
pipeline: { | ||
indent: 0, | ||
items : ['jquery'], | ||
prefix: '//= require ', | ||
separator: '\n', | ||
} | ||
} | ||
} | ||
@@ -34,0 +61,0 @@ } |
{ | ||
"name": "lg-share", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Social media share module for lightgallery.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -63,11 +63,11 @@ ![travis](https://travis-ci.org/sachinchoolur/lg-share.svg?branch=master) | ||
<!-- License | ||
License | ||
--- | ||
#### Commercial license | ||
If you want to use lightGallery to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary. Purchase a lightGallery Commercial License at uplabs.com/posts/lightgallery | ||
If you want to use lightGallery to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary. Purchase a lightGallery Commercial License at [uplabs.com/posts/lightgallery-plugin](https://www.uplabs.com/posts/lightgallery-plugin) | ||
#### Open source license | ||
If you are creating an open source application under a license compatible with the GNU GPL license v3, you may use this project under the terms of the GPLv3. --> | ||
If you are creating an open source application under a license compatible with the GNU GPL license v3, you may use this project under the terms of the GPLv3. | ||
@@ -1,2 +0,2 @@ | ||
(function($, window, document, undefined) { | ||
(function() { | ||
@@ -68,3 +68,3 @@ 'use strict'; | ||
})(jQuery, window, document); | ||
})(); | ||
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
56973
279
2