diff options
| author | Alejandro Soto <alejandro@34project.org> | 2025-09-13 14:55:15 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2025-09-13 14:55:15 -0600 |
| commit | 87f85704af1fa866be83077b2b351c1fdad7c3ce (patch) | |
| tree | b49c8d49ef717e539bff6578992e692eea55d380 /themes/tabi-lean/static/js/isso.min.js | |
| parent | 1a4c3216f027d6a6f36104547377b7b21faa5015 (diff) | |
| parent | a2ea06d513a5802964f8f0ef5795cec7e548ed7b (diff) | |
Merge commit 'a2ea06d513a5802964f8f0ef5795cec7e548ed7b' as 'themes/tabi-lean'
Diffstat (limited to 'themes/tabi-lean/static/js/isso.min.js')
| -rw-r--r-- | themes/tabi-lean/static/js/isso.min.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/themes/tabi-lean/static/js/isso.min.js b/themes/tabi-lean/static/js/isso.min.js new file mode 100644 index 0000000..833eaff --- /dev/null +++ b/themes/tabi-lean/static/js/isso.min.js @@ -0,0 +1 @@ +function initIsso(){const e=document.querySelector(".comments");if(e)if("true"===e.getAttribute("data-lazy-loading")){const a=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&(loadIsso(e),a.unobserve(e))})});a.observe(e)}else loadIsso(e)}function loadIsso(t){var e=t.getAttribute("data-endpoint-url"),a=t.getAttribute("data-isso-id"),s=t.getAttribute("data-title"),i=t.getAttribute("data-page-language"),o=t.getAttribute("data-max-comments-top"),r=(t.getAttribute("data-max-comments-nested"),t.getAttribute("data-avatar")),d=t.getAttribute("data-voting"),n=t.getAttribute("data-page-author-hashes"),u=document.createElement("script");u.src=e+"js/embed.min.js",u.async=!0,u.setAttribute("data-isso",e),u.setAttribute("data-isso-lang",i),u.setAttribute("data-isso-max-comments-top",o),u.setAttribute("data-isso-avatar",r),u.setAttribute("data-isso-vote",d),u.setAttribute("data-isso-page-author-hashes",n),u.setAttribute("data-isso-css","false"),(e=document.createElement("section")).id="isso-thread",e.setAttribute("data-isso-id",a),e.setAttribute("data-title",s),t.appendChild(e),t.appendChild(u),(i=document.createElement("link")).rel="stylesheet",i.type="text/css",i.href="/isso.min.css",document.head.appendChild(i)}initIsso(); |
