var u=[{cat:"shopping",hosts:["amazon.","ebay.","aliexpress.","etsy.","mercadolibre."]},{cat:"social",hosts:["twitter.com","x.com","facebook.","instagram.","tiktok.","reddit."]},{cat:"news",hosts:["cnn.com","foxnews.com","dailymail.","bbc.","nytimes.","elpais.","marca."]}],m=["muere","muerte","crisis","guerra","esc\xE1ndalo","escandalo","tragedia","horror","death","war","crisis","scandal","shocking","outrage","slams"];function d(){let e=location.hostname.toLowerCase(),o=(document.title||"").toLowerCase(),t="neutral";for(let s of u)if(s.hosts.some(l=>e.includes(l))){t=s.cat;break}return t==="news"&&m.some(s=>o.includes(s))&&(t="negative-news"),t}var r=0,h=3,f=2e3;function c(){let e=d(),o={type:"PAGE_CATEGORY",category:e};(e==="news"||e==="negative-news")&&(o.title=document.title||"");try{chrome.runtime.sendMessage(o,()=>{chrome.runtime.lastError?n():r=0})}catch{n()}}function n(){r++,!(r>=h)&&setTimeout(c,f)}c();var a=document.title,i=null;new MutationObserver(()=>{document.title!==a&&(a=document.title,clearTimeout(i),i=setTimeout(c,500))}).observe(document.querySelector("title")||document.head,{subtree:!0,childList:!0,characterData:!0});
