diff --git a/bower.json b/bower.json index 0dad463..96a41bd 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "lightgallery.js", - "version": "1.1.3", + "version": "1.2.0", "description": "Full featured lightbox gallery. Zero dependencies", "main": [ "dist/js/lightgallery.min.js", diff --git a/demo/js/lg-autoplay.js b/demo/js/lg-autoplay.js index c7e822c..5696b87 100644 --- a/demo/js/lg-autoplay.js +++ b/demo/js/lg-autoplay.js @@ -1,9 +1,9 @@ /**! - * lg-autoplay.js | 1.0.0 | October 5th 2016 + * lg-autoplay.js | 1.2.0 | May 20th 2020 * http://sachinchoolur.github.io/lg-autoplay.js * Copyright (c) 2016 Sachin N; * @license GPLv3 - */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.LgAutoplay = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o
'),e.progress(),e.core.s.autoplay&&e.startlAuto(),utils.on(e.el,"onDragstart.lgtm touchstart.lgtm",function(){e.interval&&(e.cancelAuto(),e.canceledOnTouch=!0)}),utils.on(e.el,"onDragend.lgtm touchend.lgtm onSlideClick.lgtm",function(){!e.interval&&e.canceledOnTouch&&(e.startlAuto(),e.canceledOnTouch=!1)})},o.prototype.progress=function(){var e=this,t,o;utils.on(e.el,"onBeforeSlide.lgtm",function(){e.core.s.progressBar&&e.fromAuto&&(t=e.core.outer.querySelector(".lg-progress-bar"),o=e.core.outer.querySelector(".lg-progress"),e.interval&&(o.removeAttribute("style"),utils.removeClass(t,"lg-start"),setTimeout(function(){utils.setVendor(o,"Transition","width "+(e.core.s.speed+e.core.s.pause)+"ms ease 0s"),utils.addClass(t,"lg-start")},20))),e.fromAuto||e.core.s.fourceAutoplay||e.cancelAuto(),e.fromAuto=!1})},o.prototype.controls=function(){var e=this,t='';e.core.outer.querySelector(this.core.s.appendAutoplayControlsTo).insertAdjacentHTML("beforeend",t),utils.on(e.core.outer.querySelector(".lg-autoplay-button"),"click.lg",function(){utils.hasClass(e.core.outer,"lg-show-autoplay")?(e.cancelAuto(),e.core.s.fourceAutoplay=!1):e.interval||(e.startlAuto(),e.core.s.fourceAutoplay=e.fourceAutoplayTemp)})},o.prototype.startlAuto=function(){var e=this;utils.setVendor(e.core.outer.querySelector(".lg-progress"),"Transition","width "+(e.core.s.speed+e.core.s.pause)+"ms ease 0s"),utils.addClass(e.core.outer,"lg-show-autoplay"),utils.addClass(e.core.outer.querySelector(".lg-progress-bar"),"lg-start"),e.interval=setInterval(function(){e.core.index+1
'),e.progress(),e.core.s.autoplay&&e.startlAuto(),utils.on(e.el,"onDragstart.lgtm touchstart.lgtm",function(){e.interval&&(e.cancelAuto(),e.canceledOnTouch=!0)}),utils.on(e.el,"onDragend.lgtm touchend.lgtm onSlideClick.lgtm",function(){!e.interval&&e.canceledOnTouch&&(e.startlAuto(),e.canceledOnTouch=!1)})},o.prototype.progress=function(){var e=this,t,o;utils.on(e.el,"onBeforeSlide.lgtm",function(){e.core.s.progressBar&&e.fromAuto&&(t=e.core.outer.querySelector(".lg-progress-bar"),o=e.core.outer.querySelector(".lg-progress"),e.interval&&(o.removeAttribute("style"),utils.removeClass(t,"lg-start"),setTimeout(function(){utils.setVendor(o,"Transition","width "+(e.core.s.speed+e.core.s.pause)+"ms ease 0s"),utils.addClass(t,"lg-start")},20))),e.fromAuto||e.core.s.fourceAutoplay||e.cancelAuto(),e.fromAuto=!1})},o.prototype.controls=function(){var e=this;e.core.outer.querySelector(this.core.s.appendAutoplayControlsTo).insertAdjacentHTML("beforeend",''),utils.on(e.core.outer.querySelector(".lg-autoplay-button"),"click.lg",function(){utils.hasClass(e.core.outer,"lg-show-autoplay")?(e.cancelAuto(),e.core.s.fourceAutoplay=!1):e.interval||(e.startlAuto(),e.core.s.fourceAutoplay=e.fourceAutoplayTemp)})},o.prototype.startlAuto=function(){var e=this;utils.setVendor(e.core.outer.querySelector(".lg-progress"),"Transition","width "+(e.core.s.speed+e.core.s.pause)+"ms ease 0s"),utils.addClass(e.core.outer,"lg-show-autoplay"),utils.addClass(e.core.outer.querySelector(".lg-progress-bar"),"lg-start"),e.interval=setInterval(function(){e.core.index+1'; + var shareHtml = ''; this.core.outer.querySelector('.lg-toolbar').insertAdjacentHTML('beforeend', shareHtml); this.core.outer.querySelector('.lg').insertAdjacentHTML('beforeend', '
'); - utils.on(document.getElementById('lg-share'), 'click.lg', function () { + var shareButton = document.getElementById('lg-share'); + utils.on(shareButton, 'click.lg', function () { if (utils.hasClass(_this.core.outer, 'lg-dropdown-active')) { utils.removeClass(_this.core.outer, 'lg-dropdown-active'); + shareButton.setAttribute('aria-expanded', false); } else { utils.addClass(_this.core.outer, 'lg-dropdown-active'); + shareButton.setAttribute('aria-expanded', true); } }); utils.on(document.getElementById('lg-dropdown-overlay'), 'click.lg', function () { utils.removeClass(_this.core.outer, 'lg-dropdown-active'); + shareButton.setAttribute('aria-expanded', false); }); utils.on(_this.core.el, 'onAfterSlide.lgtm', function (event) { @@ -131,4 +135,4 @@ }); },{}]},{},[1])(1) -}); \ No newline at end of file +}); diff --git a/demo/js/lg-share.min.js b/demo/js/lg-share.min.js index 53e4672..ac929dd 100644 --- a/demo/js/lg-share.min.js +++ b/demo/js/lg-share.min.js @@ -1,7 +1,7 @@ /**! - * lg-share.js | 1.2.0 | January 14th 2018 + * lg-share.js | 1.3.0 | May 20th 2020 * http://sachinchoolur.github.io/lg-share.js * Copyright (c) 2016 Sachin N; * @license GPLv3 */ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.LgShare=e()}}(function(){var e,t,o;return function e(t,o,r){function n(i,a){if(!o[i]){if(!t[i]){var l="function"==typeof require&&require;if(!a&&l)return l(i,!0);if(s)return s(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var d=o[i]={exports:{}};t[i][0].call(d.exports,function(e){var o=t[i][1][e];return n(o?o:e)},d,d.exports,e,t,o,r)}return o[i].exports}for(var s="function"==typeof require&&require,i=0;i",this.core.outer.querySelector(".lg-toolbar").insertAdjacentHTML("beforeend",t),this.core.outer.querySelector(".lg").insertAdjacentHTML("beforeend",'
'),utils.on(document.getElementById("lg-share"),"click.lg",function(){utils.hasClass(e.core.outer,"lg-dropdown-active")?utils.removeClass(e.core.outer,"lg-dropdown-active"):utils.addClass(e.core.outer,"lg-dropdown-active")}),utils.on(document.getElementById("lg-dropdown-overlay"),"click.lg",function(){utils.removeClass(e.core.outer,"lg-dropdown-active")}),utils.on(e.core.el,"onAfterSlide.lgtm",function(t){setTimeout(function(){e.core.s.facebook&&document.getElementById("lg-share-facebook").setAttribute("href","https://www.facebook.com/sharer/sharer.php?u="+e.getSharePropsUrl(t.detail.index,"data-facebook-share-url")),e.core.s.twitter&&document.getElementById("lg-share-twitter").setAttribute("href","https://twitter.com/intent/tweet?text="+e.getShareProps(t.detail.index,"data-tweet-text")+"&url="+e.getSharePropsUrl(t.detail.index,"data-twitter-share-url")),e.core.s.googlePlus&&document.getElementById("lg-share-googleplus").setAttribute("href","https://plus.google.com/share?url="+e.getSharePropsUrl(t.detail.index,"data-googleplus-share-url")),e.core.s.pinterest&&document.getElementById("lg-share-pinterest").setAttribute("href","http://www.pinterest.com/pin/create/button/?url="+e.getSharePropsUrl(t.detail.index,"data-pinterest-share-url")+"&media="+encodeURIComponent(e.getShareProps(t.detail.index,"href")||e.getShareProps(t.detail.index,"data-src"))+"&description="+e.getShareProps(t.detail.index,"data-pinterest-text"))},100)})},r.prototype.getSharePropsUrl=function(e,t){var o=this.getShareProps(e,t);return o||(o=window.location.href),encodeURIComponent(o)},r.prototype.getShareProps=function(t,o){var r="";return this.core.s.dynamic?r=this.core.items[t][e(o.replace("data-",""))]:this.core.items[t].getAttribute(o)&&(r=this.core.items[t].getAttribute(o)),r},r.prototype.destroy=function(){},window.lgModules.share=r})},{}]},{},[1])(1)}); \ No newline at end of file +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.LgShare=e()}}(function(){var e,t,r;return function(){function e(t,r,o){function n(i,a){if(!r[i]){if(!t[i]){var l="function"==typeof require&&require;if(!a&&l)return l(i,!0);if(s)return s(i,!0);var d=new Error("Cannot find module '"+i+"'");throw d.code="MODULE_NOT_FOUND",d}var c=r[i]={exports:{}};t[i][0].call(c.exports,function(e){return n(t[i][1][e]||e)},c,c.exports,e,t,r,o)}return r[i].exports}for(var s="function"==typeof require&&require,i=0;i