PageSourceSearch

https://rakennusmaailma.fi/wp-content/plugins/om-block-latest-post…/view.js?ver=021ad57d63d4617a705d

js rakennusmaailma.fi collected 2026-10-02 12:52:48 UTC 1,289 bytes, 1 lines download raw bytes

1import{getContext as t,store as o}from"@wordpress/interactivity";const s="om-latest-posts-block",e=t=>{const o=document.createElement("textarea");return o.innerHTML=t,o.textContent};o(s,{actions:{init(){o(s).actions.loadMore()},loadMore(){const o=t();o.showButton=!1;const s=o.dailyGrouping?"&time_grouping=day":"",a=o.dayOfLastPost&&o.dayOfLastPost.length>0?"&time_of_last_post="+o.dayOfLastPost:"";fetch(`/wp-json/om/v3/posts?order=desc&post_type=post,om_digimag_post,om_theme_article&posts_per_page=${o.postsPerPage}&page=${o.page}${s}${a}`).then(t=>{if(!t.ok)throw new Error("Network response was not ok "+t.statusText);return t.json()}).then(t=>{t.posts&&0!==t.posts.length?(t.posts=t.posts.map(t=>({...t,title:e(t.title)})),o.posts=[...o.posts,...t.posts],o.page++,!1===t.is_last_page&&(o.showButton=!0),t.year_of_last_post&&(o.dayOfLastPost=t.day_of_last_post)):o.showButton=!1}).catch(t=>{console.error("Fetch error:",t)})}},callbacks:{postHtmlInit(){const o=document.querySelectorAll(".js-archive-post-result"),s=t();o.forEach(t=>{const o=t.getAttribute("data-attr-post-id"),e=s.posts.find(t=>t.id===parseInt(o));if(e&&e.om_header_html.length>0){const o=t.querySelector(".js-archive-post-result-header");o&&(o.outerHTML='<a href="'+e.permalink+'"'+e.om_header_html+"</a>")}})}}});

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.