diff --git a/dist/read-more-read-less.min.js b/dist/read-more-read-less.min.js index 034656c..8952797 100644 --- a/dist/read-more-read-less.min.js +++ b/dist/read-more-read-less.min.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){},function(e,t,n){"use strict";function r(e,t){!function(e,t){Array.prototype.forEach.call(e,t)}(document.querySelectorAll(e),t)}n.r(t);n(0);r(".o-read-more-read-less__toggle",(function(e){if("1"!==e.getAttribute("data-processed")){e.setAttribute("data-processed","1"),function(e,t){e.classList.add(t)}(e.parentNode,"o-read-more-read-less");let t=e.getAttribute("data-more")||"Read more",n=e.getAttribute("data-less")||"Read less",r=document.createElement("span");for(r.setAttribute("class","o-read-more-read-less__content");e.nextSibling;)r.appendChild(e.nextSibling);e.parentNode.insertBefore(r,e),e.parentNode.insertBefore(document.createTextNode(" "),e),e.innerHTML=t,e.addEventListener("click",(function(r){r.preventDefault();let o=function(e,t){return e.classList.contains(t)}(e.parentNode,"is-expanded");!function(e,t,n){e.classList.toggle(t,n)}(e.parentNode,"is-expanded",!o),e.innerHTML=o?t:n}))}}))}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){},function(e,t,n){"use strict";function r(e,t){!function(e,t){Array.prototype.forEach.call(e,t)}(document.querySelectorAll(e),t)}function o(){r(".o-read-more-read-less__toggle",(function(e){if("1"!==e.getAttribute("data-processed")){e.setAttribute("data-processed","1"),function(e,t){e.classList.add(t)}(e.parentNode,"o-read-more-read-less");let t=e.getAttribute("data-more")||"Read more",n=e.getAttribute("data-less")||"Read less",r=document.createElement("span");for(r.setAttribute("class","o-read-more-read-less__content");e.nextSibling;)r.appendChild(e.nextSibling);e.parentNode.insertBefore(r,e),e.parentNode.insertBefore(document.createTextNode(" "),e),e.innerHTML=t,e.addEventListener("click",(function(r){r.preventDefault();let o=function(e,t){return e.classList.contains(t)}(e.parentNode,"is-expanded");!function(e,t,n){e.classList.toggle(t,n)}(e.parentNode,"is-expanded",!o),e.innerHTML=o?t:n}))}}))}n.r(t);n(0);window.processReadMoreReadLess=o,o()}]); \ No newline at end of file diff --git a/src/js/index.js b/src/js/index.js index af8373a..c57a4bc 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -1,2 +1,2 @@ -import init from './utils/init'; +import init from './init'; init();