Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@20minutes/tyr

Package Overview
Dependencies
Maintainers
2
Versions
449
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@20minutes/tyr - npm Package Compare versions

Comparing version 0.1.70 to 0.1.71

dist/assets/scripts/thirdParties/ads/adSlotsKeyValues.d.ts

2

dist/js/ads.min.js

@@ -1,1 +0,1 @@

(function(){"use strict";const E={desktop:{article:{BAN_ATF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250], [1600,1200]]",BAN_BTF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]",BAN_MTF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]",INREAD:"[[1,1], [300,250], [300,250v], [640,380], [640,380v], [640,533], [640,533v]]",INSTREAM_DESKTOP:"[[300,250v], [640,380v], [640,533v]]",PAVE_ARTICLE:"[[1,1], [300,250], [336,280], [600,250], [770,250]]",PAVE_ATF:"[[1,1], [300,250], [300,600], [336,280]]",PAVE_BTF:"[[1,1], [300,250], [300,600], [336,280]]",PAVE_COM:"[[1,1], [300,250], [336,280], [600,250], [770,250]]",PAVE_MTF:"[[1,1], [300,250], [300,600], [336,280]]"},divers:{BAN_ATF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250], [1600,1200]]",BAN_BTF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]",BAN_MTF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]",INREAD:"[[1,1], [300,250], [300,250v], [640,380], [640,380v], [640,533], [640,533v]]",PAVE_ARTICLE:"[[1,1], [300,250]]",PAVE_ATF:"[[1,1], [300,250], [300,600]]",PAVE_BTF:"[[1,1], [300,250], [300,600]]",PAVE_COM:"[[1,1], [300,250]]",PAVE_MTF:"[[1,1], [300,250], [300,600]]"},horoscope:{BAN_ATF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250], [1600,1200]]",BAN_BTF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]",BAN_MTF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]",INREAD:"[[1,1], [300,250], [300,250v], [640,380], [640,380v], [640,533], [640,533v]]",PAVE_ARTICLE:"[[1,1], [300,250]]",PAVE_ATF:"[[1,1], [300,250], [300,600]]",PAVE_BTF:"[[1,1], [300,250], [300,600]]",PAVE_COM:"[[1,1], [300,250]]",PAVE_MTF:"[[1,1], [300,250], [300,600]]"}},mobile:{article:{ARTICLE_ATF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]",ARTICLE_BTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]",ARTICLE_MTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]",HEADER_AD:'[[1,1], [300,50], [300,100], [320,50], [320,100], "Fluid"]',INREAD:'[[300,250], [300,250v], [640,380], [640,533], [640,533v], "Fluid"]',INSTREAM_DESKTOP:"[[300,250v], [640,380v], [640,533v]]",INTRASTITIEL_GAG:"[[1,1], [320,480]]",INTRASTITIEL_PROG:"[[1,1], [320,480]]",PAVE_COM:"[[1,1], [300,168], [300,250], [300,250v], [320,50], [320,100], [320,480], [336,280]]"},divers:{ARTICLE_ATF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",ARTICLE_BTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",ARTICLE_MTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",HEADER_AD:'[[1,1], [320,50], [320,100], "Fluid"]',INREAD:'[[300,250], [300,250v], [640,380], [640,380v], [640,533], [640,533v], "Fluid"]',INTRASTITIEL_GAG:"[[1,1], [320,480]]",INTRASTITIEL_PROG:"[[1,1], [320,480]]",NFB_1:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",NFB_2:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]"},horoscope:{ARTICLE_ATF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",ARTICLE_BTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",ARTICLE_MTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",HEADER_AD:'[[1,1], [320,50], [320,100], "Fluid"]',INREAD:'[[300,250], [300,250v], [640,380], [640,380v], [640,533], [640,533v], "Fluid"]',INTRASTITIEL_GAG:"[[1,1], [320,480]]",INTRASTITIEL_PROG:"[[1,1], [320,480]]",NFB_1:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",NFB_2:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]"}}};var I=(e=>(e[e.article=0]="article",e[e.divers=1]="divers",e[e.horoscope=2]="horoscope",e))(I||{}),g=(e=>(e.UNKNOWN="Non connu",e.SLIDESHOW_COVER="Slideshow cover",e.SLIDESHOW_COVER_LISTING_PAGE="Slideshow listing page",e.SLIDESHOW_PAGE="Slideshow page",e.ARTICLE="article",e.MISC="divers",e.HOME="home",e.LIVE="live",e.SECTION="section",e.TAG="tag",e))(g||{}),r=(e=>(e.MISC="divers",e.HOME="home",e.LOCAL="local",e.PLANET="plan\xE8te",e))(r||{}),T=(e=>(e.PAGETYPE="pageType",e.TAGS="tags",e))(T||{});const h=e=>{var t,o,d,a;switch(e){case"pageType":return Object.values(g).includes((t=window.datalayer)==null?void 0:t.page_type)?(o=window.datalayer.page_type)==null?void 0:o.toLowerCase():g.MISC;case"tags":return Object.values(r).includes((d=window.datalayer)==null?void 0:d.tags)?(a=window.datalayer.tags)==null?void 0:a.toLowerCase():r.MISC}return window.datalayer[e]},S=()=>{window.dfp=window.dfp||{},window.dfp.targeting=window.dfp.targeting||{},Object.values(T).forEach(e=>{window.dfp.targeting[e]=h(e)})},m=["nfb_1","nfb_2","article_btf"],b=e=>{var t;const o=e instanceof Array?e:[e];window.dfp.slots=((t=window.dfp)==null?void 0:t.slots)||[],window.dfp.slots=[...window.dfp.slots,...o]},f=(e,t=window.dfp.targeting)=>{const o=e.getAttribute("data-dfp-name"),d=e.getAttribute("data-dfp-path"),a=e.getAttribute("id"),n=d?.split("/").filter(i=>i!==""),s=(n?.[1]||null)==="20minutes_desktop"?"desktop":"mobile",A=n?.[n.length-1]||null;if(a&&o&&s&&A){let i;if(i=o&&JSON.parse(E[s][A][o.toUpperCase()])||null,d&&i&&googletag){let l=null;if(m.includes(o)?(l=googletag.defineSlot([d,o].join("/"),i),l!=null&&l.getSlotElementId()&&e.setAttribute("id",l.getSlotElementId())):l=googletag.defineSlot([d,o].join("/"),i,a),!l)return;l.addService(googletag.pubads()),b({slotElementId:l.getSlotElementId(),path:d,sizes:JSON.stringify(i)}),Object.entries(t).map(([V,G])=>l?.setTargeting(V,G))}}},R=(e=window.dfp.targeting)=>{window.dfp.slotsReady=!1,googletag.cmd.push(()=>{document.querySelectorAll("div[data-dfp-path]").forEach(t=>f(t,e)),window.dfp.slotsReady=!0})};let w=!1,v=0;const F=1500,c="renderAd",p=e=>{console.log(`20minDfpCall: adslot with following id has been called: %c${e}`,"color: #0777;font-weight:bold;")},L=()=>w||googletag&&googletag.pubadsReady&&window.dfp.slotsReady&&window.dfp.hubvisorEnd,u=e=>{googletag&&googletag.cmd.push(()=>{const t={};googletag.pubads().getSlots().forEach(a=>{t[a.getSlotElementId()]=a});const o=[],d=[];e.forEach(a=>{t[a]&&(o.push(t[a]),d.push(t[a].getSlotElementId()))}),o.length&&window.Hubvisor("20minutes:refresh",[...d],()=>{googletag.cmd.push(()=>{googletag.pubads().refresh([...o]),d.forEach(a=>{p(a)})})})})},N=()=>{document.addEventListener(c,e=>{if(!e.target)return;const t=e;t&&t.target.closest("[data-dfp-name]")&&t.detail.length&&u([t.detail[0].id])},!0)},C=()=>{const e=document.querySelectorAll('div[data-dfp-name][data-delayed="true"]');Array.prototype.forEach.call(e,t=>{t.addEventListener(t.getAttribute("id"),function o(){t.dispatchEvent(new CustomEvent(c,{detail:[{id:t.getAttribute("id")}]})),p(t.getAttribute("id")),t.removeEventListener(c,o)})})},y=()=>{const e=[],t=document.querySelectorAll('div[data-dfp-name][data-delayed="false"]');t.length>0&&Array.prototype.forEach.call(t,o=>{e.push(o.getAttribute("id")),p(o.getAttribute("id"))}),u(e)},_=()=>{y(),C()},P=()=>{const e=setInterval(()=>{if(!L()&&v<F){v+=100;return}clearInterval(e),w=!0,N(),document.readyState!=="loading"?_():window.addEventListener("DOMContentLoaded",()=>{_()})},100)},O=e=>document.cookie.indexOf(e)!==-1,D=e=>{const t=document.cookie.split(";").filter(o=>o.indexOf(e)!==-1)[0];return t?t.split("=")[1]:"{}"},M=()=>{googletag.cmd.push(()=>{googletag.pubads().setTargeting("lang","fr"),googletag.pubads().setTargeting("dn",window.location.hostname);try{const t=window.location.href.split("?")[1];t&&t.split("&").forEach(o=>{const d=o.split("=");d[0]==="20minutest"&&googletag.pubads().setTargeting(d[0],d[1])})}catch{}googletag.pubads().enableSingleRequest(),googletag.pubads().disableInitialLoad(),googletag.enableServices(),O("20min_fp")&&window.Didomi.getUserConsentStatusForPurpose("publicite-9qedKJMX")&&googletag.pubads().setPublisherProvidedId(D("20min_fp"));const e=Math.max(document.documentElement.clientWidth,window.innerWidth||0);e>=1400?googletag.pubads().setTargeting("screen",["1400","1000"]):e>=1e3&&googletag.pubads().setTargeting("screen","1000")})},B=()=>{googletag.cmd.push(()=>{googletag.pubads().addEventListener("impressionViewable",e=>{const t=e.slot;document.querySelectorAll(".c-ad-placeholder").forEach(o=>{var d;((d=o.getAttribute("data-dfp-id"))!=null?d:o.getAttribute("id"))===t.getSlotElementId()&&o.classList.add("placeholder-with-ad")})})})};(()=>{window.dfp.initDfpSlot=f,window.dfp.callSlots=u,M(),S(),R(),P(),B()})()})();
(function(){"use strict";const E={desktop:{article:{BAN_ATF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250], [1600,1200]]",BAN_BTF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]",BAN_MTF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]",INREAD:"[[1,1], [300,250], [300,250v], [640,380], [640,380v], [640,533], [640,533v]]",INSTREAM_DESKTOP:"[[300,250v], [640,380v], [640,533v]]",PAVE_ARTICLE:"[[1,1], [300,250], [336,280], [600,250], [770,250]]",PAVE_ATF:"[[1,1], [300,250], [300,600], [336,280]]",PAVE_BTF:"[[1,1], [300,250], [300,600], [336,280]]",PAVE_COM:"[[1,1], [300,250], [336,280], [600,250], [770,250]]",PAVE_MTF:"[[1,1], [300,250], [300,600], [336,280]]"},divers:{BAN_ATF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250], [1600,1200]]",BAN_BTF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]",BAN_MTF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]",INREAD:"[[1,1], [300,250], [300,250v], [640,380], [640,380v], [640,533], [640,533v]]",PAVE_ARTICLE:"[[1,1], [300,250]]",PAVE_ATF:"[[1,1], [300,250], [300,600]]",PAVE_BTF:"[[1,1], [300,250], [300,600]]",PAVE_COM:"[[1,1], [300,250]]",PAVE_MTF:"[[1,1], [300,250], [300,600]]"},horoscope:{BAN_ATF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250], [1600,1200]]",BAN_BTF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]",BAN_MTF:"[[1,1], [728,90], [970,90], [970,250], [980,250], [1000,90], [1000,250]]",INREAD:"[[1,1], [300,250], [300,250v], [640,380], [640,380v], [640,533], [640,533v]]",PAVE_ARTICLE:"[[1,1], [300,250]]",PAVE_ATF:"[[1,1], [300,250], [300,600]]",PAVE_BTF:"[[1,1], [300,250], [300,600]]",PAVE_COM:"[[1,1], [300,250]]",PAVE_MTF:"[[1,1], [300,250], [300,600]]"}},mobile:{article:{ARTICLE_ATF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]",ARTICLE_BTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]",ARTICLE_MTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480], [336,280]]",HEADER_AD:'[[1,1], [300,50], [300,100], [320,50], [320,100], "Fluid"]',INREAD:'[[300,250], [300,250v], [640,380], [640,533], [640,533v], "Fluid"]',INSTREAM_DESKTOP:"[[300,250v], [640,380v], [640,533v]]",INTRASTITIEL_GAG:"[[1,1], [320,480]]",INTRASTITIEL_PROG:"[[1,1], [320,480]]",PAVE_COM:"[[1,1], [300,168], [300,250], [300,250v], [320,50], [320,100], [320,480], [336,280]]"},divers:{ARTICLE_ATF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",ARTICLE_BTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",ARTICLE_MTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",HEADER_AD:'[[1,1], [320,50], [320,100], "Fluid"]',INREAD:'[[300,250], [300,250v], [640,380], [640,380v], [640,533], [640,533v], "Fluid"]',INTRASTITIEL_GAG:"[[1,1], [320,480]]",INTRASTITIEL_PROG:"[[1,1], [320,480]]",NFB_1:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",NFB_2:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]"},horoscope:{ARTICLE_ATF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",ARTICLE_BTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",ARTICLE_MTF:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",HEADER_AD:'[[1,1], [320,50], [320,100], "Fluid"]',INREAD:'[[300,250], [300,250v], [640,380], [640,380v], [640,533], [640,533v], "Fluid"]',INTRASTITIEL_GAG:"[[1,1], [320,480]]",INTRASTITIEL_PROG:"[[1,1], [320,480]]",NFB_1:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]",NFB_2:"[[1,1], [300,50], [300,100], [300,168], [300,250], [320,50], [320,100], [320,480]]"}}};var I=(e=>(e[e.article=0]="article",e[e.divers=1]="divers",e[e.horoscope=2]="horoscope",e))(I||{}),g=(e=>(e.UNKNOWN="Non connu",e.SLIDESHOW_COVER="Slideshow cover",e.SLIDESHOW_COVER_LISTING_PAGE="Slideshow listing page",e.SLIDESHOW_PAGE="Slideshow page",e.ARTICLE="article",e.MISC="divers",e.HOME="home",e.LIVE="live",e.SECTION="section",e.TAG="tag",e))(g||{}),r=(e=>(e.MISC="divers",e.HOME="home",e.LOCAL="local",e.PLANET="plan\xE8te",e))(r||{}),T=(e=>(e.PAGETYPE="pageType",e.TAGS="tags",e))(T||{});const h=e=>{var t,o,d,a;switch(e){case"pageType":return Object.values(g).includes((t=window.datalayer)==null?void 0:t.page_type)?(o=window.datalayer.page_type)==null?void 0:o.toLowerCase():g.MISC;case"tags":return Object.values(r).includes((d=window.datalayer)==null?void 0:d.tags)?(a=window.datalayer.tags)==null?void 0:a.toLowerCase():r.MISC}return window.datalayer[e]},S=()=>{window.dfp=window.dfp||{},window.dfp.targeting=window.dfp.targeting||{},Object.values(T).forEach(e=>{window.dfp.targeting[e]=h(e)})},m=["nfb_1","nfb_2","article_btf"],b="adDefined",R=e=>{var t;const o=e instanceof Array?e:[e];window.dfp.slots=((t=window.dfp)==null?void 0:t.slots)||[],window.dfp.slots=[...window.dfp.slots,...o]},f=(e,t=window.dfp.targeting)=>{const o=e.getAttribute("data-dfp-name"),d=e.getAttribute("data-dfp-path"),a=e.getAttribute("id"),i=d?.split("/").filter(n=>n!==""),s=(i?.[1]||null)==="20minutes_desktop"?"desktop":"mobile",A=i?.[i.length-1]||null;if(a&&o&&s&&A){let n;if(n=o&&JSON.parse(E[s][A][o.toUpperCase()])||null,d&&n&&googletag){let l=null;if(m.includes(o)?(l=googletag.defineSlot([d,o].join("/"),n),l!=null&&l.getSlotElementId()&&e.setAttribute("id",l.getSlotElementId())):l=googletag.defineSlot([d,o].join("/"),n,a),!l)return;document.dispatchEvent(new CustomEvent(b,{detail:[{elem:e}]})),l.addService(googletag.pubads()),R({slotElementId:l.getSlotElementId(),path:d,sizes:JSON.stringify(n)}),Object.entries(t).map(([G,H])=>l?.setTargeting(G,H))}}},F=(e=window.dfp.targeting)=>{window.dfp.slotsReady=!1,googletag.cmd.push(()=>{document.querySelectorAll("div[data-dfp-path]").forEach(t=>f(t,e)),window.dfp.slotsReady=!0})};let v=!1,w=0;const L=1500,c="renderAd",p=e=>{console.log(`20minDfpCall: adslot with following id has been called: %c${e}`,"color: #0777;font-weight:bold;")},C=()=>v||googletag&&googletag.pubadsReady&&window.dfp.slotsReady&&window.dfp.hubvisorEnd,u=e=>{googletag&&googletag.cmd.push(()=>{const t={};googletag.pubads().getSlots().forEach(a=>{t[a.getSlotElementId()]=a});const o=[],d=[];e.forEach(a=>{t[a]&&(o.push(t[a]),d.push(t[a].getSlotElementId()))}),o.length&&window.Hubvisor("20minutes:refresh",[...d],()=>{googletag.cmd.push(()=>{googletag.pubads().refresh([...o]),d.forEach(a=>{p(a)})})})})},N=()=>{document.addEventListener(c,e=>{if(!e.target)return;const t=e;t&&t.target.closest("[data-dfp-name]")&&t.detail.length&&u([t.detail[0].id])},!0)},y=()=>{const e=document.querySelectorAll('div[data-dfp-name][data-delayed="true"]');Array.prototype.forEach.call(e,t=>{t.addEventListener(t.getAttribute("id"),function o(){t.dispatchEvent(new CustomEvent(c,{detail:[{id:t.getAttribute("id")}]})),p(t.getAttribute("id")),t.removeEventListener(c,o)})})},P=()=>{const e=[],t=document.querySelectorAll('div[data-dfp-name][data-delayed="false"]');t.length>0&&Array.prototype.forEach.call(t,o=>{e.push(o.getAttribute("id")),p(o.getAttribute("id"))}),u(e)},_=()=>{P(),y()},O=()=>{const e=setInterval(()=>{if(!C()&&w<L){w+=100;return}clearInterval(e),v=!0,N(),document.readyState!=="loading"?_():window.addEventListener("DOMContentLoaded",()=>{_()})},100)},D=e=>document.cookie.indexOf(e)!==-1,M=e=>{const t=document.cookie.split(";").filter(o=>o.indexOf(e)!==-1)[0];return t?t.split("=")[1]:"{}"},B=()=>{googletag.cmd.push(()=>{googletag.pubads().setTargeting("lang","fr"),googletag.pubads().setTargeting("dn",window.location.hostname);try{const t=window.location.href.split("?")[1];t&&t.split("&").forEach(o=>{const d=o.split("=");d[0]==="20minutest"&&googletag.pubads().setTargeting(d[0],d[1])})}catch{}googletag.pubads().enableSingleRequest(),googletag.pubads().disableInitialLoad(),googletag.enableServices(),D("20min_fp")&&window.Didomi.getUserConsentStatusForPurpose("publicite-9qedKJMX")&&googletag.pubads().setPublisherProvidedId(M("20min_fp"));const e=Math.max(document.documentElement.clientWidth,window.innerWidth||0);e>=1400?googletag.pubads().setTargeting("screen",["1400","1000"]):e>=1e3&&googletag.pubads().setTargeting("screen","1000")})},V=()=>{googletag.cmd.push(()=>{googletag.pubads().addEventListener("impressionViewable",e=>{const t=e.slot;document.querySelectorAll(".c-ad-placeholder").forEach(o=>{var d;((d=o.getAttribute("data-dfp-id"))!=null?d:o.getAttribute("id"))===t.getSlotElementId()&&o.classList.add("placeholder-with-ad")})})})};(()=>{window.dfp.initDfpSlot=f,window.dfp.callSlots=u,B(),S(),F(),O(),V()})()})();

@@ -1,1 +0,1 @@

(function(){"use strict";const a=e=>document.cookie.indexOf(e)!==-1,d=e=>{const t=document.cookie.split(";").filter(n=>n.indexOf(e)!==-1)[0];return t?t.split("=")[1]:"{}"},l=e=>{const t=[`${e.name}=`,"expires=Thu, 1 Jan 1970 00:00:01 UTC","path=/"];e.domain&&t.push(`domain=${e.domain}`),document.cookie=t.join("; ")},u=(e,t=100)=>{const n=e.getBoundingClientRect(),o=window.pageYOffset||document.documentElement.scrollTop,i=Math.max(document.documentElement.clientHeight,window.innerHeight||0),C=o+i,_=n.top+o;return C>_-t};let r=[],s;const m=(e,t)=>{let n=!1;return()=>{n||(e(),n=!0,s=setTimeout(()=>{n=!1},t))}},p=e=>e.event&&u(e.elem,Number(e.distance))?(e.elem.dispatchEvent(new Event(e.event)),e.elem.dataset.lazyLoaded="true",!1):!0,c=()=>{m(()=>{r=r.filter(p),r.length<=0&&(clearTimeout(s),window.removeEventListener("scroll",c))},50)()},g=()=>{r.length<=0||window.addEventListener("scroll",c)},h=e=>{r.push(e),g()},f=()=>{document.querySelectorAll('[data-delayed="true"]').forEach(e=>{const t={elem:e,event:e.getAttribute("id"),distance:e.dataset.distanceVisible};h(t)})},b=(e,t,n=()=>{})=>{performance.mark(`20mn:${e}:Start`);const o=document.getElementsByTagName("script")[0],i=document.createElement("script");i.async=!0,i.src=t,i.onload=()=>{n(),performance.mark(`20mn:${e}:End`)},o&&o.parentNode&&o.parentNode.insertBefore(i,o)},v=()=>{var e;!document.querySelector(".gcse-search")||!((e=window.envVariables)!=null&&e.googleSearchCode)||b("googlesearch",`https://cse.google.com/cse.js?cx=${window.envVariables.googleSearchCode}`)},w=()=>{v()},E=e=>{const t={},n=document.createElement("a");return n.href=e,n.search.substring(1).split("&").forEach(o=>{const i=o.split("=");t[i[0]]=decodeURIComponent(i[1])}),t},k=()=>{var e,t;const n=E(window.location.href),o=document.createElement("div");o.className="OUTBRAIN",o.setAttribute("data-widget-id","type|default('AR_1')"),o.setAttribute("data-src","https://www.20minutes.fr"),"advertisingId"in n&&"appVersion"in n&&(o.setAttribute("data-ob-user-id",n.advertisingId),o.setAttribute("data-ob-app-ver",n.appVersion),o.setAttribute("data-ob-installation-key","{{ outbrain_ios_id }}")),(t=(e=document?.currentScript)==null?void 0:e.parentNode)==null||t.insertBefore(o,document.currentScript)},y=()=>{k()},A=()=>{if(a("20min_fp")){const e=d("20min_fp");fetch(`https://securepubads.g.doubleclick.net/user_data_deletion?ppid=${e}&iu=49926454`,{referrerPolicy:"strict-origin-when-cross-origin"}).then(t=>{t.ok&&alert("La demande de suppression a bien \xE9t\xE9 prise en compte")}),l({name:"20min_fp"})}},S=()=>{const e=document.getElementById("delete-fingerprint");e&&e.addEventListener("click",A)};(()=>{S(),f(),w(),y()})()})();
(function(){"use strict";const d=e=>document.cookie.indexOf(e)!==-1,l=e=>{const t=document.cookie.split(";").filter(n=>n.indexOf(e)!==-1)[0];return t?t.split("=")[1]:"{}"},u=e=>{const t=[`${e.name}=`,"expires=Thu, 1 Jan 1970 00:00:01 UTC","path=/"];e.domain&&t.push(`domain=${e.domain}`),document.cookie=t.join("; ")},m=(e,t=100)=>{const n=e.getBoundingClientRect(),i=window.pageYOffset||document.documentElement.scrollTop,o=Math.max(document.documentElement.clientHeight,window.innerHeight||0),V=i+o,x=n.top+i;return V>x-t};var p=(e=>(e[e.article=0]="article",e[e.divers=1]="divers",e[e.horoscope=2]="horoscope",e))(p||{}),g=(e=>(e.UNKNOWN="Non connu",e.SLIDESHOW_COVER="Slideshow cover",e.SLIDESHOW_COVER_LISTING_PAGE="Slideshow listing page",e.SLIDESHOW_PAGE="Slideshow page",e.ARTICLE="article",e.MISC="divers",e.HOME="home",e.LIVE="live",e.SECTION="section",e.TAG="tag",e))(g||{}),h=(e=>(e.MISC="divers",e.HOME="home",e.LOCAL="local",e.PLANET="plan\xE8te",e))(h||{}),v=(e=>(e.PAGETYPE="pageType",e.TAGS="tags",e))(v||{});const f="adDefined",E=()=>{if(d("20min_fp")){const e=l("20min_fp");fetch(`https://securepubads.g.doubleclick.net/user_data_deletion?ppid=${e}&iu=49926454`,{referrerPolicy:"strict-origin-when-cross-origin"}).then(t=>{t.ok&&alert("La demande de suppression a bien \xE9t\xE9 prise en compte")}),u({name:"20min_fp"})}},b=()=>{const e=document.getElementById("delete-fingerprint");e&&e.addEventListener("click",E)};let r=[],a;const w=(e,t)=>{let n=!1;return()=>{n||(e(),n=!0,a=setTimeout(()=>{n=!1},t))}},S=e=>e.event&&m(e.elem,Number(e.distance))?(e.elem.dispatchEvent(new Event(e.event)),e.elem.dataset.lazyLoaded="true",!1):!0,s=()=>{w(()=>{r=r.filter(S),r.length<=0&&(clearTimeout(a),window.removeEventListener("scroll",s))},50)()},y=()=>{r.length<=0||window.addEventListener("scroll",s)},c=e=>{r.push(e),y()},T=()=>{document.addEventListener(f,e=>{const t=e,{elem:n}=t.detail[0];if(n.getAttribute("data-delayed")!=="true")return;const i={elem:n,event:n.getAttribute("id"),distance:n.dataset.distanceVisible};c(i)})},I=()=>{document.querySelectorAll('[data-delayed="true"]:not([data-dfp-name])').forEach(e=>{const t={elem:e,event:e.getAttribute("id"),distance:e.dataset.distanceVisible};c(t)})},L=()=>{T(),I()},O=(e,t,n=()=>{})=>{performance.mark(`20mn:${e}:Start`);const i=document.getElementsByTagName("script")[0],o=document.createElement("script");o.async=!0,o.src=t,o.onload=()=>{n(),performance.mark(`20mn:${e}:End`)},i&&i.parentNode&&i.parentNode.insertBefore(o,i)},A=()=>{var e;!document.querySelector(".gcse-search")||!((e=window.envVariables)!=null&&e.googleSearchCode)||O("googlesearch",`https://cse.google.com/cse.js?cx=${window.envVariables.googleSearchCode}`)},C=()=>{A()},N=e=>{const t={},n=document.createElement("a");return n.href=e,n.search.substring(1).split("&").forEach(i=>{const o=i.split("=");t[o[0]]=decodeURIComponent(o[1])}),t},_=()=>{var e,t;const n=N(window.location.href),i=document.createElement("div");i.className="OUTBRAIN",i.setAttribute("data-widget-id","type|default('AR_1')"),i.setAttribute("data-src","https://www.20minutes.fr"),"advertisingId"in n&&"appVersion"in n&&(i.setAttribute("data-ob-user-id",n.advertisingId),i.setAttribute("data-ob-app-ver",n.appVersion),i.setAttribute("data-ob-installation-key","{{ outbrain_ios_id }}")),(t=(e=document?.currentScript)==null?void 0:e.parentNode)==null||t.insertBefore(i,document.currentScript)},k=()=>{_()};(()=>{b(),L(),C(),k()})()})();
{
"name": "@20minutes/tyr",
"version": "0.1.70",
"version": "0.1.71",
"repository": "git@github.com:20minutes/tyr.git",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc