-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.min.js
More file actions
1 lines (1 loc) · 1.37 KB
/
index.min.js
File metadata and controls
1 lines (1 loc) · 1.37 KB
1
!function(){"use strict";var e,n=document,t=window,r=function(e,t){return(t||n).querySelector(e)},a=function(e){return n.forms[e]||null},o=function(e,n){return n?e.closest(n)||null:e.parentNode||null},c=function(e,n){return e.append(n),n},i=function(e,n){return e.classList.add(n),e},u=t.location,f=function(e){return e&&e.preventDefault()},s=function(e,n,t,r){n.addEventListener(e,t,r)};function l(e){return m(e).searchParams.get("parent")}function m(e){return new URL(e)}s("click",n,function(n){var t=a("comment");if(t&&!l(u.href)){var i,s,p,h=o(n.target,'a[href$="#comment"]:not([href*="&parent="],[href*="?parent="])'),d=h&&o(h,".comments[data-status]"),v=r(".comments-footer",d),y=t.elements,L=y.content,g=y.parent;if(h&&d.contains(h))c(v||d,(s="in-reply",(i=t).classList.remove(s),i)),t.action=((p=m(p=t.action)).searchParams.delete("parent"),p+""),L&&(L.focus(),e&&(L.placeholder=e)),g&&(g.value=""),f(n)}},!0),s("click",n,function(n){var t=a("comment");if(t){var u,s,p,h=o(n.target,'a[href$="#comment"]:is([href*="&parent="],[href*="?parent="])'),d=h&&o(h,".comment"),v=r(".comment-footer",d),y=t.elements,L=y.content,g=y.parent;if(h&&d.contains(h))v?(s=v,p=i(t,"in-reply"),s.before(p)):c(d,i(t,"in-reply")),t.action=function(e,n){return(e=m(e)).searchParams.set("parent",n),e+""}(t.action,u=l(h.href)),L&&(e||(e=L.placeholder),L.focus(),L.placeholder=h.title),g&&(g.value=u),f(n)}},!0)}();