PageSourceSearch

https://regeringen.dk/dist/assets/index-CahuaAVJ.js

js regeringen.dk collected 2026-10-02 03:39:34 UTC 708 bytes, 1 lines download raw bytes

1import{a as u,E as d}from"./api-fetcher-D7q-2H74.js";const g=e=>{const r=e.closest(".js-likes-and-comments");if(!r)return;const o=e.querySelector(".js-like-button"),n=e.querySelector(".js-like-count"),c=r.querySelector(".js-verification-token");if(!o||!n||!c)return;const s=e.dataset.contentId;if(!s)return;const i=t=>{o.classList.toggle("liked",t);const l=parseInt(n.innerText,10)||0;n.innerText=String(l+(t?1:-1))},a=async()=>{try{const t=await u(`${d.toggleLike}?contentId=${encodeURIComponent(s)}`,{headers:{RequestVerificationToken:c.value},method:"POST"});i(t.liked)}catch(t){console.error("Error toggling like:",t)}};o.addEventListener("click",t=>{t.preventDefault(),a()})};export{g as ContentLikes};

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.