Advertisement
geminilabs

Untitled

Nov 5th, 2024 (edited)
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. document.addEventListener("DOMContentLoaded",()=>{var n,s;void 0!==window.GLSR&&(n=e=>"checkbox"===e.type?e.name+e.value:e.name,s=e=>sessionStorage.setItem(n(e.target),e.target.value),GLSR.Event.on("site-reviews/loaded",()=>{GLSR.forms.forEach(e=>[...e.form.elements].forEach(e=>{var t,a;e.disabled||e.readonly||["file","hidden","password","submit"].includes(e.type)||["input","select","textarea"].includes(e.localName)&&(t=e,null!==(a=sessionStorage.getItem(n(t)))&&(["checkbox","radio"].includes(t.type)?t.checked=t.value===a:t.value=a,t.dispatchEvent(new Event("change"))),e.addEventListener("change",s))}))}),GLSR.Event.on("site-reviews/form/handle",e=>{!0===e.success&&sessionStorage.clear()}))});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement