PageSourceSearch

https://www.sydsvenskan.se/assets/rev/js/morreman-blob-module-MPFGYLDJ.js

js sydsvenskan.se collected 2026-10-01 08:46:49 UTC 1,914 bytes, 2 lines download raw bytes

1import{a as i,b as a}from"./chunk-ZOYOJ6FT.js";import"./chunk-6KHOHYTW.js";var s=class{constructor(e){this.element=e,this.morremanBlob=this.element.querySelector(".morreman__blob"),this.wrapper=this.element.querySelector(".beta-tester-wrapper"),this.availableFeatures=JSON.parse(this.element.dataset.availableFeatures),this.ALLOWED_FEATURES=JSON.parse(this.element.dataset.allowedFeatures),this.cookieSettings="; path=/; domain="+window.location.hostname+"; max-age="+86400*365+";",this._init()}_init(){this._clearOutdatedCookies(),this._clearDefaultActive(),this._populateFeatureFlags(),this.morremanBlob.addEventListener("click",e=>{if(this.element.dataset.state==="open"){this._close();return}this.element.dataset.state==="closed"&&this._open()})}_close(){this.element.dataset.state="closed"}_open(){this.element.dataset.state="open",this.wrapper.querySelectorAll('input[type="checkbox"]').forEach(e=>{e.addEventListener("click",t=>{t.target.checked?this._setCookie(t.target.value):this._removeCookie(t.target.value),window.location.reload()})})}_clearOutdatedCookies(){let e=this._getFeatureFlags();for(let t of e)Object.keys(this.ALLOWED_FEATURES).includes(t)||this._removeCookie(t)}_clearDefaultActive(){for(let e of Object.keys(this.ALLOWED_FEATURES))this.ALLOWED_FEATURES[e].initialValue===!0&&this._removeCookie(e)}_populateFeatureFlags(){let e=this._getFeatureFlags();e&&e.length>0&&this.element.querySelectorAll('input[type="checkbox"]').forEach(t=>{e.includes(t.value)&&(t.checked=!0)})}_getFeatureFlags(){let e=i("featureFlags");return(e?e.split(":"):[]).filter(Boolean)}_removeCookie(e){let t=this._getFeatureFlags();t.includes(e)&&a("featureFlags",t.filter(o=>o!==e).join(":"),{expires:86400*365})}_setCookie(e){let t=this._getFeatureFlags();t.includes(e)||a("featureFlags",t.concat(e).join(":"),{expires:86400*365})}};export{s as default};
2//# sourceMappingURL=morreman-blob-module-MPFGYLDJ.js.map

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.