PageSourceSearch

https://www.irishexaminer.com/pu_examiner/scripts/zephr/zephr-tools.min.js?v=0.37

js irishexaminer.com collected 2026-10-01 07:46:14 UTC 4,557 bytes, 1 lines download raw bytes

1window.jwtData={clientUserId:"",accountReference:""};document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".signout_btn").forEach(btn=>{btn.addEventListener("click",zephrLogout)})});window.jwtDataPromise=refreshJwtData(true);function refreshJwtData(isInitial=false){return new Promise((resolve,reject)=>{const jwtCookie=getCookie("blaize_jwt");if(!jwtCookie){console.log("🚫 No JWT cookie found");resolve(window.jwtData);return}console.log(isInitial?"🔄 Initial JWT refresh...":"🔁 Silent background JWT refresh...");$.ajax({url:"/pu_examiner/ajax/blaize.php",type:"GET",success:jsonData=>{const debug=getCookie("blaize_debug");if(debug==="refreshed_expired"){console.log("🟡 Token was expired and refreshed – reloading...");document.cookie="blaize_debug=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=.irishexaminer.com";window.location.reload();return}if(jsonData&&typeof jsonData==="object"&&jsonData.success){console.log("✅ JWT refresh successful");window.jwtData.clientUserId=typeof jsonData.clientUserId==="string"?jsonData.clientUserId:"";window.jwtData.accountReference=typeof jsonData.accountReference==="string"?jsonData.accountReference:"";const pathname=window.location.pathname;if(pathname==="/login"||pathname==="/login/"){document.body.classList.add("user-signed-in")}resolve(window.jwtData)}else{if(!window.location.href.includes("photos.")){console.warn("⚠️ JWT refresh failed – triggering logout");zephrLogout();reject("Invalid or unsuccessful JWT response")}}},error:err=>{console.error("❌ AJAX error while refreshing JWT:",err);zephrLogout();reject(err)}})})}setInterval(()=>{refreshJwtData(false).then(()=>console.log("⏱️ Background JWT refresh completed")).catch(err=>console.warn("Background JWT refresh failed:",err))},50*60*1e3);function zephrLogout(){const cookieNames=["blaize_jwt","blaize_user","IE_st"];cookieNames.forEach(name=>{document.cookie=`${name}=; Max-Age=0; path=/;`;document.cookie=`${name}=; Max-Age=0; path=/; domain=.irishexaminer.com; secure`;document.cookie=`${name}=; Max-Age=0; path=/; domain=www.irishexaminer.com; secure`});console.log("🚪 User logged out – blaize_jwt and blaize_user removed");window.location.href="/signed-out/"}function getCookie(cname){let name=cname+"=";let decodedCookie=decodeURIComponent(document.cookie);let ca=decodedCookie.split(";");for(let i=0;i<ca.length;i++){let c=ca[i];while(c.charAt(0)==" "){c=c.substring(1)}if(c.indexOf(name)==0){return c.substring(name.length,c.length)}}return""}function getZephrPermutiveObj(clientUserID){let zephrPermutiveObject={outcomes:[],meters:[],authenticated:GetZephrValue("accessDetail
1s.isAuthenticated"),activeProducts:GetZephrValue("accessDetails.activeProducts")};const outcomes=GetZephrValue("outcomes");if(typeof outcomes==="object"&&outcomes!==null){zephrPermutiveObject.outcomes=Object.keys(outcomes).map(key=>outcomes[key])}else{zephrPermutiveObject.outcomes=[]}const activeDecisionArray=getActiveDecisionArray();if(activeDecisionArray){for(const meter of activeDecisionArray){zephrPermutiveObject.meters.push({entitlementId:meter.entitlementId,remainingCredits:meter.remainingCredits,totalCredits:meter.totalCredits,decrementedInDecision:meter.decrementedInDecision})}}return zephrPermutiveObject}function GetZephrValue(path){if(typeof Zephr!=="undefined"){const keys=path.split(".");let current=Zephr;for(const key of keys){if(typeof current==="object"&&current!==null&&key in current){current=current[key]}else{return undefined}}return current}return undefined}function getActiveDecisionArray(){const trials=GetZephrValue("accessDetails.trials");let array=[];if(typeof trials=="object"){for(const trial in trials){if(trials[trial].usedInDecision){console.log(trials[trial]);trials[trial].entitlementId=trial;array.push(trials[trial])}}}return array.length>0?array:undefined}function waitForZephr(callback,maxAttempts=20,interval=200){let attempts=0;const checkInterval=setInterval(()=>
1{if(typeof Zephr!=="undefined"&&Zephr.accessDetails){clearInterval(checkInterval);callback()}else if(++attempts>=maxAttempts){clearInterval(checkInterval);callback()}},interval)}window.userStateZephr="Unknown";function setUserState(){if(typeof Zephr!=="undefined"&&Zephr.accessDetails){const isAuthenticated=Zephr.accessDetails.isAuthenticated;const entitlements=Zephr.accessDetails.entitlements;if(!isAuthenticated){window.userStateZephr="Logged Out"}else if(entitlements&&Object.keys(entitlements).length>0){window.userStateZephr="Subscribed"}else{window.userStateZephr="Logged In"}}}

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.