From: Radek Czajka Date: Fri, 28 Oct 2022 13:34:30 +0000 (+0200) Subject: minor fix X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/ee895cba48224b0e393d58bc5ba2323123c2c204?hp=d18f17e7a8bdcafd4ef341b1cbe90c5c275a9dcb minor fix --- diff --git a/src/wolnelektury/static/js/contrib/tlite.min.js b/src/wolnelektury/static/js/contrib/tlite.min.js index ed330343e..383977bbd 100644 --- a/src/wolnelektury/static/js/contrib/tlite.min.js +++ b/src/wolnelektury/static/js/contrib/tlite.min.js @@ -1,2 +1 @@ function tlite(t){document.addEventListener("mouseover",function(e){var i=e.target,n=t(i);n||(i=i.parentElement,n=i&&t(i)),n&&tlite.show(i,n,!0)})}tlite.show=function(t,e,i){function n(t,e){function n(){u=t.title||t.getAttribute(l)||u,t.title="",t.setAttribute(l,""),u&&!a&&(a=setTimeout(d,i?150:1))}function r(){tlite.hide(t,!0)}function s(e){i===e&&(a=clearTimeout(a),f&&t.removeChild(f),f=void 0)}function d(){f||(f=o(t,u,e))}var f,a,u;return t.addEventListener("mousedown",r),t.addEventListener("mouseleave",r),t.tooltip={show:n,hide:s}}function o(t,e,i){function n(){o.className="tlite tlite-"+r+s;var e=10,i=t.offsetTop,n=t.offsetLeft;o.offsetParent===t&&(i=n=0);var l=t.offsetWidth,d=t.offsetHeight,f=o.offsetHeight,a=o.offsetWidth,u=n+l/2;o.style.top=("s"===r?i-f-e:"n"===r?i+d+e:i+d/2-f/2)+"px",o.style.left=("w"===s?n:"e"===s?n+l-a:"w"===r?n+l+e:"e"===r?n-a-e:u-a/2)+"px"}var o=document.createElement("span"),l=i.grav||t.getAttribute("data-tlite")||"n";o.innerHTML=e,t.appendChild(o);var r=l[0]||"",s=l[1]||"";n();var d=o.getBoundingClientRect();return"s"===r&&d.top<0?(r="n",n()):"n"===r&&d.bottom>window.innerHeight?(r="s",n()):"e"===r&&d.left<0?(r="w",n()):"w"===r&&d.right>window.innerWidth&&(r="e",n()),o.className+=" tlite-visible",o}var l="data-tlite";e=e||{},(t.tooltip||n(t,e)).show()},tlite.hide=function(t,e){t.tooltip&&t.tooltip.hide(e)},"undefined"!=typeof module&&module.exports&&(module.exports=tlite); -//# sourceMappingURL=tlite.min.js.map \ No newline at end of file