summaryrefslogtreecommitdiff
path: root/dist/LightBox.Captions.min.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dist/LightBox.Captions.min.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/dist/LightBox.Captions.min.js b/dist/LightBox.Captions.min.js
new file mode 100644
index 0000000..a98da4c
--- /dev/null
+++ b/dist/LightBox.Captions.min.js
@@ -0,0 +1 @@
+var LightBox=LightBox||{};LightBox.Captions=function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){n(this,t),this.element=document.createElement("div"),this.element.id="imagelightbox-caption"}return i(t,[{key:"register",value:function(t){this.lightbox=t,t.addOnLoadStartListener(this.hideCaption.bind(this)),t.addOnLoadEndListener(this.showCaption.bind(this)),t.addOnEndListener(this.hideCaption.bind(this))}},{key:"showCaption",value:function(){var t=this.lightbox.target.querySelector("img");if(null!==t){var e=t.getAttribute("alt");null!==e&&e.length>0&&(this.element.innerHTML=t.alt,document.body.appendChild(this.element))}}},{key:"hideCaption",value:function(){try{document.body.removeChild(this.element)}catch(t){}}}]),t}();e["default"]=o,t.exports=e["default"]}]); \ No newline at end of file