PageSourceSearch

https://getcomics.org/share/themes/ecko-onyx/assets/js/theme.min.js?ver=3.3.0

js getcomics.org collected 2026-10-03 23:02:11 UTC 11,676 bytes, 1 lines download raw bytes

1"use strict";!function(e){(window.onyxTheme=window.onyxTheme||{}).active=!0;const t=document.querySelector.bind(document),o=document.querySelectorAll.bind(document);function s(e,t,o){document.addEventListener(e,(e=>{const s=e.target.closest(t);s&&o(e,s)}))}function a(e,t){let o="#",s=null,a=null;for(6>(e=String(e).replace(/[^0-9a-f]/gi,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0,a=0;3>a;a++)s=parseInt(e.substr(2*a,2),16),s=Math.round(Math.min(Math.max(0,s+s*t),255)).toString(16),o+=("00"+s).substr(s.length);return o}function n(){o("article.format-gallery").forEach((e=>{var o;const s=e.querySelector(".post-header-gallery");s.style.height=(null===(o=s.querySelector(".ecko_post_gallery img.active"))||void 0===o?void 0:o.clientHeight)+"px",setTimeout((()=>{t(".post-list-masonry")&&window.masonrypostlist.layout()}),400)}))}function i(){var e;null===(e=t(".ecko_post_gallery br"))||void 0===e||e.remove();o(".ecko_post_gallery").forEach((e=>{var t;null===(t=e.querySelector("img"))||void 0===t||t.classList.add("active"),imagesLoaded(e,(()=>{n()}))})),window.resizeTimer=null,t("article.format-gallery")&&window.addEventListener("resize",(()=>{clearTimeout(window.resizeTimer),window.resizeTimer=setTimeout(n(),300)}),{passive:!0})}function r(){s("click",".pagination-load-more",((e,s)=>{s.querySelector(".pagination-load-more-text").innerHTML=eckoThemeVars.localization_fetching_posts,s.querySelector(".pagination-load-more-loader").style.display="inline-block",function(e){if(t(".pagination-older")){const s=t(".pagination-older").getAttribute("href");fetch(s).then((e=>e.text())).then((a=>{var n;const r=(new DOMParser).parseFromString(a,"text/html"),l=r.querySelectorAll(".post-list article.post"),c=null===(n=r.querySelector(".pagination-older"))||void 0===n?void 0:n.getAttribute("href");if(l.forEach((e=>{e.classList.add("post-new"),e.style.opacity=0})),document.body.classList.contains("page-layout-masonry"))l.forEach((e=>{e.style.display="none",t(".post-list-posts").appendChild(e)})),imagesLoaded(".post-list",(()=>{o(".post-list article.post").forEach((e=>{e.style.display="block"})),window.masonrypostlist.appended(l),i()}));else{l.forEach((e=>{t(".post-list-posts").appendChild(e)}));o(".post-list article.post").forEach((e=>{e.style.opacity=1})),imagesLoaded(".post-list",(()=>{i()}))}history.replaceState(null,null,s),t(".pagination-active-page").textContent=parseInt(t(".pagination-active-page").textContent)+1,imagesLoaded(".post-list",(()=>{var o;void 0!==c?(t(".pagination-older").setAttribute("href",c),e()):(null===(o=t(".pagination-older"))||void 0===o||o.remove(),t(".pagination-load-more-text").innerHTML=eckoThemeVars.localization_no_more_posts,t(".pagination-load-more-x").style.display="inline-block",t(".pagination-load-more-loader").style.display="none",t(".pagination-load-more").style.pointerEvents="none")}))}))}}((()=>{s.querySelector(".pagination-load-more-loader").style.display="none",s.querySelector(".pagination-load-more-text").innerHTML=eckoThemeVars.localization_load_more})),e.preventDefault()}))}function l(){setTimeout((()=>{var e,l;t(".post-list-masonry")&&(window.masonrypostlist=new Masonry(".post-list-masonry .post-list-posts",{itemSelector:".post, .page",percentPosition:!0}),imagesLoaded(".post-list-masonry .post-list-posts",(()=>{window.masonrypostlist.layout()})).on("progress",(()=>{window.masonrypostlist.layout()})),setTimeout((function(){window.masonrypostlist.layout()}),1e3),setTimeout((function(){window.masonrypostlist.layout()}),5e3)),function(){if("1"===eckoThemeVars.topbar_sticky){const e=t(".top-bar-sticky");e&&(0<window.pageYOffset?e.classList.add("top-bar-stuck"):e.classList.remove("top-bar-stuck"),document.addEventListener("scroll",(()=>{0<window.pageYOffset?e.classList.add("top-bar-stuck"):e.classList.remove("top-bar-stuck")}),{capture:!0,passive:!0}))}}(),function(){if("1"===eckoThemeVars.general_hidecomments&&""===window.location.hash){const e=t(".comments-main"),o=t(".post-comments-body");e&&o&&(e.style.display="none",t(".post-show-comments").style.display="block")}}(),function(){const e=t(".post-show-comments"),o=t(".comments-main");null==e||e.addEventListener("click",(()=>{e&&o&&(e.style.display="none",o.style.display="block")}))}(),t(".cover-blog-posts")&&(t(".cover-load-indicator").style.animationPlayState="running",setInterval((function(){const e=t(".cover-post-active");let o=null==e?void 0:e.nextElementSibling;o||(o=t(".cover-blog-posts .cover-post")),e.classList.remove("cover-post-active"),e.classList.add("cover-post-inactive"),o.classList.remove("cover-post-inactive"),o.classList.add("cover-post-active"),e.querySelector(".post-category").style.background="";const s=o.querySelector(".post-category");s.style.background=s.dataset.categoryColor,t(".cover-post-background-"+e.dataset.postId).style.opacity="0",t(".cover-post-background-"+o.dataset.postId).style.opacity="0.7"}),8e3)),function(){const e=t(".cover-post");if(e){e.classList.add("cover-post-active");const t=e.querySelector(".post-category");t.style.background=t.dataset.categoryColor}}(),o(".post-related-post .post-category").forEach((e=>{e.style.background=""})),o(".required.email").forEach((e=>{e.setAttribute("placeholder",eckoThemeVars.localization_email_address+"...")})),null===(e=t(".widget.subscribe .inner form"))||void 0===e||e.insertAdjacentHTML("beforeend",'<span class="subscribe-submit">&#10140;
1</span>'),null===(l=t(".footer-sub form"))||void 0===l||l.insertAdjacentHTML("beforeend",'<span class="subscribe-submit">&#10140;</span>'),i(),function(){if("1"===eckoThemeVars.pagination_enable_ajax){const e=t(".pagination-standard"),o=t(".pagination-ajax");e&&(e.style.display="none"),o&&(o.style.display="block")}}(),function(){const e=o(".show-search"),s=t(".page-overlay-search"),a=t(".page-overlay-search .query");e.forEach((e=>{e.addEventListener("click",(e=>{s&&a&&(s.classList.add("page-overlay-open"),setTimeout((function(){a.focus()}),1e3)),e.preventDefault()}))}))}(),o("nav li.menu-item-has-children > a").forEach((e=>{e.addEventListener("click",(()=>{if("#"===e.getAttribute("href"))return!1}))})),o(".show-nav").forEach((e=>{e.addEventListener("click",(()=>{const e=t("nav.navigation-responsive > ul, nav.navigation-responsive > div > ul");e&&e.classList.toggle("active")}))})),o(".widget.navigation li.menu-item-has-children > a").forEach((e=>{e.addEventListener("click",(t=>{const o=e.closest(".menu-item");var s;o&&(null===(s=o.querySelector(".sub-menu"))||void 0===s||s.classList.toggle("active")),t.preventDefault()}))})),o("nav.navigation-responsive li.menu-item-has-children > a").forEach((e=>{e.addEventListener("click",(t=>{const o=e.closest(".menu-item");var s;o&&(null===(s=o.querySelector(".sub-menu"))||void 0===s||s.classList.toggle("active")),t.preventDefault()}))})),o(".page-overlay-close").forEach((e=>{e.addEventListener("click",(()=>{var t;const o=e.closest(".page-overlay");null==o||o.classList.remove("page-overlay-open"),null==o||null===(t=o.querySelector(".overlay-media-embed iframe"))||void 0===t||t.remove()}))})),o(".post-play, .post.format-video .post-header-image").forEach((e=>{e.addEventListener("click",(o=>{if(960<window.innerWidth&&915<window.innerHeight){o.preventDefault();const s=e.closest(".post"),a=s.dataset.postId,n=window.post_video[a],i=document.createElement("div");i.innerHTML=n;const r=0===i.childNodes.length?"":i.childNodes[0].nodeValue;t(".page-overlay-media .overlay-media-embed").innerHTML=r,t(".page-overlay-media .post-title a").textContent=s.querySelector(".post-title").textContent,t(".page-overlay-media .post-excerpt").textContent=s.querySelector(".post-excerpt").textContent,t(".page-overlay-media .post-title a").setAttribute("href",s.querySelector(".post-title a").getAttribute("href")),t(".page-overlay-media .post-read-more").setAttribute("href",s.querySelector(".post-title a").getAttribute("href")),t(".page-overlay-media").classList.add("page-overlay-open")}}))})),s("mouseover",".category-fade",((e,t)=>{t.style.background=a(t.dataset.categoryColor,-.25)})),s("mouseout",".category-fade",((e,t)=>{t.style.background=t.dataset.categoryColor})),o(".post-related-post").forEach((e=>{const t=e.querySelector(".post-category");e.addEventListener("mouseenter",(()=>{t.style.background=t.dataset.categoryColor})),e.addEventListener("mouseleave",(()=>{t.style.background=""}))})),o(".scroll-back-top").forEach((e=>{e.addEventListener("click",(e=>{window.scroll({top:0,left:0,behavior:"smooth"}),e.preventDefault()}))})),o(".scroll-cover").forEach((e=>{e.addEventListener("click",(e=>{const o=t(".cover");o&&window.scroll({top:o.clientHeight,left:0,behavior:"smooth"}),e.preventDefault()}))})),o(".filter-bar-options li a").forEach((e=>{const t=e.closest("li");e.addEventListener("mouseenter",(()=>{e.dataset.categoryColor&&(t.classList.contains("active")?e.style.backgroundColor=a(e.dataset.categoryColor,-.25):e.style.backgroundColor=e.dataset.categoryColor)})),e.addEventListener("mouseleave",(()=>{e.dataset.categoryColor&&(t.classList.contains("active")?e.style.backgroundColor=e.dataset.categoryColor:e.style.backgroundColor="")}))})),s("mouseover",".post-list-standard .post .post-title a",((e,t)=>{var o;const s=null===(o=t.closest(".post-info"))||void 0===o?void 0:o.querySelector(".post-date-category");s&&s.classList.add("active")})),s("mouseout",".post-list-standard .post .post-title a",((e,t)=>{var o;const s=null===(o=t.closest(".post-info"))||void 0===o?void 0:o.querySelector(".post-date-category");s&&s.classList.remove("active")})),o(".subscribe-submit, .search-submit, .widget_search .submit").forEach((e=>{e.addEventListener("click",(()=>{var t;null===(t=e.closest("form"))||void 0===t||t.submit()}))})),s("click",".post-header-gallery .post-gallery-next",((e,t)=>
1{!function(e,t){var o;let s=e.querySelector(".active").nextElementSibling;s||(s=e.querySelector("img")),null===(o=e.querySelector("img.active"))||void 0===o||o.classList.remove("active"),s.classList.add("active"),t()}(t.closest(".post-header-gallery"),(()=>{n()}))})),s("click",".post-header-gallery .post-gallery-previous",((e,t)=>{!function(e,t){var o;let s=e.querySelector(".active").previousElementSibling;s||(s=e.querySelector("img:last-child")),null===(o=e.querySelector("img.active"))||void 0===o||o.classList.remove("active"),s.classList.add("active"),t()}(t.closest(".post-header-gallery"),(()=>{n()}))})),r(),s("click",".sl-button",((e,t)=>{e.preventDefault();const s=t,a=s.dataset.postId,n=s.dataset.nonce,i=s.dataset.iscomment;let r;r=o("1"===i?".sl-comment-button-"+a:".sl-button-"+a);const l=s.parentElement.querySelector(".sl-loader");if(""!==a){const e={action:"process_simple_like",post_id:a,nonce:n,is_comment:i},t=Object.keys(e).map((t=>encodeURIComponent(t)+"="+encodeURIComponent(e[t]))).join("&");l.innerHTML="",fetch(simpleLikes.ajaxurl,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:t}).then((e=>e.json())).then((e=>{const t=e.icon,o=e.count;if(r.forEach((e=>{e.innerHTML=t+o})),"unliked"===e.status){const e=simpleLikes.like;r.forEach((t=>{t.title=e,t.classList.remove("liked")}))}else{const e=simpleLikes.unlike;r.forEach((t=>{t.title=e,t.classList.add("liked")}))}l.innerHTML=""}))}})),setTimeout((function(){!function(){const e=t(".cover-post-2"),o=t(".cover-post-background-2");e&&o&&(o.style.backgroundImage=`url(${e.dataset.backgroundImage})`);const s=t(".cover-post-3"),a=t(".cover-post-background-3");s&&a&&(a.style.backgroundImage=`url(${s.dataset.backgroundImage})`)}()}),5e3)}),50)}(document.attachEvent?"complete"===document.readyState:"loading"===document.readyState)?l():document.addEventListener("load",l())}();

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.