PageSourceSearch

https://www.convert.com/wp-content/themes/olympus/js/plan-id-handler.js?ver=1790788470

js convert.com collected 2026-10-01 08:32:35 UTC 1,672 bytes, 1 lines download raw bytes

1(()=>{window.ConvertUtilsWebsite=window.ConvertUtilsWebsite||{};window.ConvertUtilsWebsite.PlanIdHandler={config:{signupLinkClass:".signup_link",planIdFieldId:"#planIDField",dataPlanIdAttr:"data-plan-id",dataDefaultPlanAttr:"data-default-plan"},updatePlanId(t){try{let e=t.getAttribute("href");if(!e)throw new Error("Signup link must have an href attribute");let n=e.replace("#",""),r=document.getElementById(n);if(!r)throw new Error(`Form modal with ID "${n}" not found`);let a=r.querySelector(this.config.planIdFieldId);if(!a)throw new Error("Plan ID field not found in form modal");let l=a.getAttribute(this.config.dataDefaultPlanAttr),i=t.getAttribute(this.config.dataPlanIdAttr);if(!l&&!i)throw new Error("No plan ID available - both default and selected plans are missing");let d=i||l;a.value=d,console.debug("Plan ID updated successfully:",{modalId:n,planId:a.value,wasDefaultUsed:!i})}catch(e){console.error("Error updating plan ID:",e),this.handleError(e)}},handleError(t){},attachEventListeners(){let t=document.querySelectorAll(this.config.signupLinkClass);if(!t.length){console.warn("No signup links found on page");return}t.forEach(e=>{e.addEventListener("click",n=>{try{this.updatePlanId(e)}catch(r){n.preventDefault(),this.handleError(r)}})})},init(){try{return this.attachEventListeners(),!0}catch(t){return console.error("Failed to initialize Plan ID Handler:",t),this.handleError(t),!1}}};typeof module>"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{window.ConvertUtilsWebsite.PlanIdHandler.init()}):window.ConvertUtilsWebsite.PlanIdHandler.init());var o=()=>window.ConvertUtilsWebsite.PlanIdHandler.init();})();

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.