1const c=t=>document.getElementById(t),n=encodeURIComponent(window.location.href),r=function(t=!0){fetch("https://api.websitecarbon.com/b?url="+n).then(function(e){if(!e.ok)throw Error(e);return e.json()}).then(function(e){t&&i(e),e.t=new Date().getTime(),localStorage.setItem("wcb_"+n,JSON.stringify(e))}).catch(function(e){c("wcb_g").innerHTML="No Result",console.log(e),localStorage.removeItem("wcb_"+n)})},i=function(t){c("wcb_g").innerHTML=t.c+"g of CO<sub>2</sub>/view",c("wcb_2").insertAdjacentHTML("beforeEnd","Cleaner than "+t.p+"% of pages tested")},a="<style>#wcb.carbonbadge{--b1:#0e11a8;--b2:#00ffbc;font-size:15px;text-align:center;color:var(--b1);line-height:1.15}#wcb.carbonbadge sub{vertical-align:middle;position:relative;top:.3em;font-size:.7em}#wcb #wcb_2,#wcb #wcb_a,#wcb #wcb_g{display:inline-flex;justify-content:center;align-items:center;text-align:center;font-size:1em;line-height:1.15;font-family:-apple-system,BlinkMacSystemFont,sans-serif;text-decoration:none;margin:.2em 0}#wcb #wcb_a,#wcb #wcb_g{padding:.3em .5em;border:.13em solid var(--b2)}#wcb #wcb_g{border-radius:.3em 0 0 .3em;background:#fff;border-right:0;min-width:8.2em}#wcb #wcb_a{border-radius:0 .3em .3em 0;border-left:0;background:var(--b1);color:#fff;font-weight:700;border-color:var(--b1)}#wcb.wcb-d #wcb_a{color:var(--b1);background:var(--b2);border-color:var(--b2)}#wcb.wcb-d #wcb_2{color:#fff}</style>",b=c("wcb");if("fetch"in window){b.insertAdjacentHTML("beforeEnd",a),b.insertAdjacentHTML("beforeEnd",'<div id="wcb_p"><span id="wcb_g">Measuring CO<sub>2</sub>…</span><a id="wcb_a" target="_blank" rel="noopener" href="https://websitecarbon.com">Website Carbon</a></div><span id="wcb_2"> </span>');let t=localStorage.getItem("wcb_"+n);const e=new Date().getTime();if(t){const o=JSON.parse(t);i(o),e-o.t>864e5&&r(!1)}else r()}
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.