PageSourceSearch

https://www.jrlc.org/assets/liquid/theme_donation_v2.js

js jrlc.org collected 2026-09-30 09:26:13 UTC 2,100 bytes, 1 lines download raw bytes

1document.addEventListener("DOMContentLoaded",(()=>{const e=document.querySelectorAll(".nb_donation_v2_amount"),t=document.getElementById("donation_amount_other_input"),n=document.getElementById("donation_amount_other"),o=document.querySelectorAll(".donation-v2-occurence-radio input"),a=e=>new URLSearchParams(window.location.search).get(e)||"",d=t=>{const n=new CustomEvent("set:amount",{detail:{amount:t}});e.forEach((e=>{e.dispatchEvent(n)}))};document.querySelectorAll('input[name="donation[amount_option]"][type="radio"]').forEach((e=>{e.addEventListener("change",(e=>{const t=r(e.target.value);t<=0||d(t.toFixed(2))}))}));const r=(e,t=".",n=",")=>{if(!e)return 0;if("number"==typeof e)return e;const o=parseFloat(String(e).replace(n,"").replace(t,"."));return isNaN(o)?0:o};if(t){const e=e=>{const t=e.target.value,n="usd"===window.NB?.payments?.currency?.toLowerCase(),o=window.NB.payments.decimal_mark,a=window.NB.payments.thousands_separator;let c,i;c=n?r(t,o,a).toFixed(2):parseFloat(t).toFixed(2),i=isNaN(c)||c<0?"0.00":c,d(i)};t.addEventListener("change",(t=>e(t)))}n&&n.addEventListener("click",(()=>{t&&(t.value="",t.focus())})),e.forEach((e=>{e.addEventListener("set:amount",(t=>{const n=t.detail?.amount||t.amount;document.querySelectorAll(".donation-v2-amount .hidden").forEach((e=>{e.classList.remove("hidden","hide")})),"INPUT"===e.tagName&&(e.value=n),e.textContent=n}))})),o.forEach((e=>{e.addEventListener("change",(e=>{const{value:t}=e.target,n=Array.from(document.querySelectorAll('[data-placeholder*="paid"]')).filter((e=>!e.getAttribute("data-placeholder").includes(`paid ${t}
1`))),o=document.querySelector(`[data-placeholder*="paid ${t}"]`);if(o){const e=o.getAttribute("data-placeholder"),t=o.getAttribute("data-i18n-placeholder");o.innerHTML=t||e,o.classList.remove("hidden")}n.forEach((e=>{e.classList.add("hidden"),e.innerHTML=""}))}))}));const c=a("amount");if(!c)return;const i=document.querySelector(`input.donation_amount_option[value="${c}"]`);if(i)i.click();else{const e=document.getElementById("donation_amount_other");e&&e.click()}d(parseFloat(c).toFixed(2))}));

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.