PageSourceSearch

https://wiebaktmee.nl/wp-content/plugins/suredash/assets/js/minified/comments.min.js?ver=1.12.0

js wiebaktmee.nl collected 2026-10-02 13:49:34 UTC 11,978 bytes, 1 lines download raw bytes

1let joditIcons={bold:`<svg class="custom-jodit-icons tooltip-trigger" data-tooltip-title="${portal_global.jodit_messages.bold_tooltip}" data-tooltip-position="top" aria-label="Bold" xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8"/></svg>`,italic:`<svg class="custom-jodit-icons tooltip-trigger" data-tooltip-title="${portal_global.jodit_messages.italic_tooltip}" data-tooltip-position="top" aria-label="Italic" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-italic"><line x1="19" x2="10" y1="4" y2="4"></line><line x1="14" x2="5" y1="20" y2="20"></line><line x1="15" x2="9" y1="4" y2="20"></line></svg>`,underline:`<svg class="custom-jodit-icons tooltip-trigger" data-tooltip-title="${portal_global.jodit_messages.underline_tooltip}" data-tooltip-position="top" aria-label="Underline" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-underline"><path d="M6 4v6a6 6 0 0 0 12 0V4"></path><line x1="4" x2="20" y1="20" y2="20"></line></svg>`,image:`<svg class="custom-jodit-icons tooltip-trigger" data-tooltip-title="${portal_global.jodit_messages.image_tooltip}" data-tooltip-position="top" aria-label="Image Upload" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-image"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"></rect><circle cx="9" cy="9" r="2"></circle><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"></path></svg>`,video:`<svg class="custom-jodit-icons tooltip-trigger" data-tooltip-title="${portal_global.jodit_messages.video_tooltip}" data-tooltip-position="top" aria-label="Video" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-video"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"></path><rect x="2" y="6" width="14" height="12" rx="2"></rect></svg>`,emoji:`<svg class="custom-jodit-icons tooltip-trigger" data-tooltip-title="${portal_global.jodit_messages.emoji_tooltip}" data-tooltip-position="top" aria-label="Emoji" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-smile"><circle cx="12" cy="12" r="10"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2"></path><line x1="9" x2="9.01" y1="9" y2="9"></line><line x1="15" x2="15.01" y1="9" y2="9"></line></svg>`,tagUser:`<svg class="custom-jodit-icons tooltip-trigger" data-tooltip-title="${portal_global.jodit_messages.mention_tooltip}" data-tooltip-position="top" aria-label="User mention" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-at-sign"><circle cx="12" cy="12" r="4"></circle><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8"></path></svg>`,giphy:`<svg class="custom-jodit-icons tooltip-trigger" data-tooltip-title="${portal_global.jodit_messages.gif_tooltip}" data-tooltip-position="top" aria-label="Giphy" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-image-play"><path d="m11 16-5 5"></path><path d="M11 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6.5"></path><path d="M15.765 22a.5.5 0 0 1-.765-.424V13.38a.5.5 0 0 1 .765-.424l5.878 3.674a1 1 0 0 1 0 1.696z"></path><circle cx="9" cy="9" r="2"></circle></svg>`},initializeJoditCommentBoxes=()=>{Jodit.modules.Icon.set("bold",joditIcons.bold),Jodit.modules.Icon.set("italic",jo
1ditIcons.italic),Jodit.modules.Icon.set("underline",joditIcons.underline),Jodit.modules.Icon.set("image",joditIcons.image),Jodit.modules.Icon.set("video",joditIcons.video),Jodit.modules.Icon.set("emoji",joditIcons.emoji),Jodit.modules.Icon.set("tagUser",joditIcons.tagUser),Jodit.modules.Icon.set("giphy",joditIcons.giphy);var e=document.querySelectorAll(".jodit-comment");e.length&&e.forEach(e=>{Jodit.instances[e.id]&&!document.body.contains(Jodit.instances[e.id].container)&&Jodit.instances[e.id].destruct(),Jodit.instances[e.id]||(portalMakeItJoditEditor({element:e}),e.closest(".comment-markup").classList.remove("sd-display-none"))})},handleReplyClick=e=>{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation();var t=e.target.closest("article.portal-comment"),o=t.closest("li"),i=t.closest(".portal-content"),l=((i?.querySelectorAll(".portal-replies-wrapper > .comment-markup:not(.hidden-comment-markup)")||[]).forEach(e=>{var t=e.closest(".portal-replies-wrapper"),o=e.closest("li"),i=e.querySelector('[id^="hidden-jodit-comment"]');i&&Jodit.instances[i.id]&&Jodit.instances[i.id].destruct(),e.remove(),t?.classList.remove("has-reply-form"),o&&(i=o.querySelector(":scope > .portal-thread-gutter"),e=o.querySelector(".comment-replies li, .comment-new-replies li"),i)&&!e&&i.querySelector(".portal-thread-line")?.remove()}),t.querySelector(".portal-user-commenter").textContent.trim()),i=i.querySelector(".hidden-comment-markup").cloneNode(!0),e=(i.classList.remove("hidden-comment-markup","sd-display-none","sd-w-full"),e.target.closest(".portal-comment").id.split("-")[1]),r=i.querySelector('input[name="comment_parent"]'),a=i.querySelector(".hidden-jodit-comment"),r=(r&&(r.value=e),a&&(a.id=a.id+"-"+e),o?.querySelector(":scope > .portal-thread-gutter")),o=(r&&!r.querySelector(".portal-thread-line")&&((e=document.createElement("div")).className="portal-thread-line",r.appendChild(e)),t.closest(".portal-thread-content")),r=o?.querySelector(".portal-replies-wrapper");r?(r.append(i),r.classList.add("has-reply-form")):((e=document.createElement("div")).className="portal-replies-wrapper has-reply-form",o.append(e),e.append(i)),i.scrollIntoView({behavior:"smooth",block:"center"}),portalMakeItJoditEditor({element:a,autoFocus:!0,placeholder:portal_global?.comment_reply_box_placeholder+` ${l}...`})},initializeNewJoditDesign=(e,t=null)=>{let o=e.container.querySelector(".jodit-toolbar__box"),i=e.container.querySelector(".jodit-workplace");var l,r=e.container.querySelector(".jodit-toolbar-editor-collection");i.style.padding="12px",o.classList.add("post-comment-options","hidden"),e.events.on("focus",()=>{o.classList.remove("hidden"),i.style.padding="12px"}),o&&i&&(i.parentNode.appendChild(o),setTimeout(()=>{var e=i.querySelector(".jodit-placeholder");e&&(e.textContent=t,e.style.paddingLeft="12px")},1)),r&&(r.style.display="flex",r.style.flexWrap="wrap",r.style.flexDirection="row",r.style.justifyContent="space-between",r.style.alignItems="center",r.style.paddingRight="0",l=e.container.parentNode.querySelector(".post-comment-box-submit"))&&(l.style.marginLeft="auto",r.appendChild(l),r=i.closest("form"))&&!r.dataset.isEditForm&&r.addEventListener("submit",e=>{e.preventDefault(),submitComment(e)}),e.container.querySelectorAll(".jodit-toolbar-button__button").forEach(e=>{e.classList.add("portal-button","button-ghost")})},submitComment=async e=>{e.preventDefault(),e.stopPropagation();var e=e.currentTarget,t=e.closest("li"),o=e.querySelector(".post-comment-box-submit"),i=parseInt(e.querySelector('input[name="comment_parent"]')?.value||0),l=e.querySelector('[name="comment"]')||null,r=o?.querySelector('.portal-svg-icon[aria-label="SendHorizontal"]'),a=o?.querySelector('.portal-svg-icon[aria-label="LoaderCircle"]');if(o&&(o.disabled=!0,r?.classList.add("sd-display-none"),a?.classList.remove("sd-display-none")),l){var s=l.value.trim();if(!s||"<p><br></p>"===s)return portalPushNotification("info",portal_global?.notification_messages?.comment_invalid),void(o&&(o.disabled=!1,r?.classList.remove("sd-display-none"),a?.classList.add("sd-display-none")))}s=new FormData(e),s.append("depth",t?.dataset?.depth??0),t=Jodit.instances[l.id].getNativeEditorValue(),t=await handleBlobImages(t,s),s.set("comment",t),l=document.querySelector("#portal-post-reaction-modal");try{var n,c=await sdApiFetch("suredash/v1/submit-comment","POST",s);c.success?(addCommentMarkup(e,c.data.comment_html,i),clearCommentBox(e),l?.querySelector(".no-comments-message")?.remove(),n=e.querySelector('[name="comment_post_ID"]')?.value||0,suredashSyncToParent("comment_created",{postId:n})):handleError(c)}catch(e){var d=e?.message||portal_global?.notification_messages?.error_occurred,p="str
1ing"==typeof e.message?e.message.replace(/&#8217;/g,"'"):"";portalPushNotification("info",d,p)}finally{o&&(o.disabled=!1,r?.classList.remove("sd-display-none"),a?.classList.add("sd-display-none"))}},addCommentMarkup=(o,i,l)=>{if(0<l){var l=o.closest(".portal-replies-wrapper"),r=o.closest(".comment-markup");let e=l?.querySelector("ol.comment-new-replies"),t=(e||((e=document.createElement("ol")).className="children comment-replies comment-new-replies",r.before(e)),e.insertAdjacentHTML("beforeend",i),e.lastElementChild?.querySelector(".portal-comment"));t&&(t.scrollIntoView({behavior:"smooth",block:"center"}),t.classList.add("portal-comment-highlighted"),setTimeout(()=>{t.classList.remove("portal-comment-highlighted")},1500))}else{l=o.closest(".portal-content").querySelector(".portal-comment-list");l.insertAdjacentHTML("beforeend",i);let e=l.lastElementChild;e&&(e.scrollIntoView({behavior:"smooth",block:"center"}),e.classList.add("portal-comment-highlighted"),setTimeout(()=>{e.classList.remove("portal-comment-highlighted")},1500))}updateCommentsCount(o),document.dispatchEvent(new Event("suredashboard_global_recurring_trigger"))},updateCommentsCount=e=>{e=e.querySelector('[name="comment_post_ID"]')?.value||0;document.querySelectorAll("#portal-post-"+e).forEach(e=>{var t,e=e.querySelector(".portal-comments-count .counter");e&&(t=parseInt(e.innerText||0),e.innerText=t+1,e.parentElement.dataset.count=t+1)})},clearCommentBox=e=>{var t,e=e.querySelector(".jodit-comment")||e.querySelector(".jodit-comment-outer")||e.querySelector(".hidden-jodit-comment");e&&((t=Jodit.instances[e.id])?(t.setEditorValue(""),t.events.fire("change")):e.value="")},handleError=e=>{var t;e?.data&&(console.error(e?.data),t="string"==typeof(e=e?.data?.message)&&e?e:portal_global?.notification_messages?.error_occurred,e="string"==typeof e?e.replace(/&#8217;/g,"'"):"",portalPushNotification("error",t,e))};document.addEventListener("click",e=>{var o=e.target.closest(".portal-comment-qv-trigger");if(o&&(document.body.classList.contains("single-community-post")||document.querySelector(".portal-content-type-lesson")||document.querySelector(".suredash-single-content"))){o=document.querySelector(".portal-comments-inner-wrap")||document.querySelector("#portal-comment");if(o){e.preventDefault(),e.stopImmediatePropagation();let t=o.querySelector(".jodit-comment");t?(t.closest(".comment-markup")?.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{var e=t.closest(".comment-markup")?.querySelector(".jodit-wysiwyg");(e||t).focus()},350)):o.scrollIntoView({behavior:"smooth",block:"center"})}}},!0),window.matchMedia("(max-width: 921px)").matches&&document.addEventListener("click",e=>{var t=e.target.closest(".portal-comment-header > div");!t||e.target.closest(".portal-likes-count, .portal-comments-count")||e.target.closest(".sd-post-reaction, .portal-post-share-trigger")||(e=t.querySelector(".sd-post-reaction, .portal-post-share-trigger"))&&e.click()});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.