PageSourceSearch

https://www2.chromatic.com/js/script.exclusions.manual.outbound-links.revenue.js

js chromatic.com collected 2026-09-24 15:21:35 UTC 3,200 bytes, 1 lines download raw bytes

1!function(){var e,t,n,i,o=document.currentScript,a={};function r(e,t,n){window.fetch&&fetch(e,{method:"POST",headers:{"Content-Type":"text/plain"},keepalive:!0,body:JSON.stringify(t)}).then(function(e){n&&n.callback&&n.callback({status:e.status})}).catch(function(e){n&&n.callback&&n.callback({error:e})})}var c=!1,l={},u=-1,d=0,s=0;function p(){var o=w();if(!e&&(u<i||o>=3e3)){u=i;var c={n:"engagement",sd:Math.round(i/n*100),d:a.domain,u:t,p:l,e:o,v:36};d=0,s=0,r(a.endpoint,c)}}function f(){"visible"===document.visibilityState&&document.hasFocus()&&0===d?d=Date.now():"hidden"!==document.visibilityState&&document.hasFocus()||(s=w(),d=0,p())}function w(){return d?s+(Date.now()-d):s}function g(){var e=document.body||{},t=document.documentElement||{};return Math.max(e.scrollHeight||0,e.offsetHeight||0,e.clientHeight||0,t.scrollHeight||0,t.offsetHeight||0,t.clientHeight||0)}function v(){var e,t;return e=window.innerHeight,t=window.scrollY,n<=e?n:t+e}function m(w,m){var b="pageview"===w;if(b&&c&&(p(),n=g(),i=v()),/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(location.hostname)||"file:"===location.protocol)return h(w,m,"localhost");if((window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)&&!window.__plausible)return h(w,m);try{if("true"===window.localStorage.plausible_ignore)return h(w,m,"localStorage flag")}catch(e){}var y=o&&o.getAttribute("data-include"),k=o&&o.getAttribute("data-exclude");function E(e){return location.pathname.match(RegExp("^"+e.trim().replace(/\*\*/g,".*").replace(/([^\.])\*/g,"$1[^\\s/]*")+"/?$"))}if(b){var L=!y||y&&y.split(",").some(E),S=k&&k.split(",").some(E);if(!L||S)return h(w,m,"exclusion rule")}var x={};x.n=w,x.v=36,x.u=m&&(m.u||m.url)||location.href,x.d=a.domain,x.r=document.referrer||null,m&&m.meta&&(x.m=JSON.stringify(m.meta)),m&&m.props&&(x.p=m.props),m&&!1===m.interactive&&(x.i=!1),m&&m.revenue&&(x.$=m.revenue),b&&(e=!1,t=x.u,l=x.p,u=-1,s=0,d=Date.now(),c||(document.addEventListener("visibilitychange",f),window.addEventListener("blur",f),window.addEventListener("focus",f),c=!0)),r(a.endpoint,x,m)}function h(t,n,i){i&&a.logging&&console.warn("Ignoring Event: "+i),n&&n.callback&&n.callback(),"pageview"===t&&(e=!0)}function b(e){if("auxclick"!==e.type||1===e.button){var t,n,i=function(e){for(var t;e&&(void 0===e.tagName||!((t=e)&&t.tagName&&"a"===t.tagName.toLowerCase())||!e.href);)e=e.parentNode;return e}(e.target);if(i&&"string"==typeof i.href&&i.href.split("?")[0],i&&"string"==typeof i.href&&i.host&&i.host!==location.host)return void((n={props:(t={name:"Outbound Link: Click",props:{url:i.href}}).props}).revenue=t.revenue,m(t.name,n))}}!function e(t){a.endpoint=o.getAttribute("data-api")||new URL(o.src).origin+"/api/event",a.domain=o.getAttribute("data-domain"),a.logging=!0,n=g(),i=v(),new ResizeObserver(function(){n=g()}).observe(document.documentElement),document.addEventListener("scroll",function(){var e=v();e>i&&(i=e)}),document.addEventListener("click",b),document.addEventListener("auxclick",b);for(var r=window.plausible&&window.plausible.q||[],c=0;c<r.length;c++)m.apply(this,r[c]);window.plausible=m,window.plausible.init=e,window.plausible.v=36,window.plausible.l=!0}()}();

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.