PageSourceSearch

https://darpan.nic.in/JavaScript/Minified/cookies.min.js

js darpan.nic.in collected 2026-10-08 18:42:25 UTC 1,648 bytes, 1 lines download raw bytes

1(()=>{"use strict";const t="cookie-consent-v1",n=document.getElementById("cookieConsent"),c=document.getElementById("cookieSettingsModal"),h=new bootstrap.Modal(c),i=document.getElementById("ckAnalytics"),r=document.getElementById("ckMarketing"),u=()=>{try{return JSON.parse(localStorage.getItem(t))}catch{return null}},f=n=>{const i={necessary:!0,analytics:!!n.analytics,marketing:!!n.marketing,updatedAt:(new Date).toISOString()};return localStorage.setItem(t,JSON.stringify(i)),document.dispatchEvent(new CustomEvent("cookieconsent:change",{detail:i})),i};let e=!1;const l=()=>{n&&!e&&n.classList.add("is-visible")},o=()=>{if(!e&&n){e=!0;n.classList.remove("is-visible");n.setAttribute("aria-hidden","true");const t=()=>n.remove();n.addEventListener("transitionend",t,{once:!0});window.setTimeout(t,700)}};document.getElementById("cookieAcceptAll").addEventListener("click",()=>{f({analytics:!0,marketing:!0}),o()});document.getElementById("cookieRejectAll").addEventListener("click",()=>{f({analytics:!1,marketing:!1}),o()});document.querySelectorAll("[data-cookie-settings]").forEach(n=>{n.addEventListener("click",n=>{n.preventDefault();const t=u();t&&(i.checked=!!t.analytics,r.checked=!!t.marketing);h.show()})});document.getElementById("cookieSavePrefs").addEventListener("click",()=>{f({analytics:i.checked,marketing:r.checked}),h.hide(),o()});const s=u();s?(i.checked=!!s.analytics,r.checked=!!s.marketing):window.setTimeout(l,600);document.getElementById("resetConsent").addEventListener("click",n=>{n.preventDefault(),localStorage.removeItem(t),location.reload()});window.CookieConsent={get:u,reset:()=>localStorage.removeItem(t)}})();

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.