function submitPollAnswer(){const queryString=window.location.search;const params=new URLSearchParams(queryString);const parameterValue=params.get('answer');const answerOption=document.querySelector('#poll-answer-'+parameterValue);if(answerOption){answerOption.checked=true;const pollElements=document.querySelectorAll('[id^="polls-"]');if(pollElements.length>0){if(!pollElements[0].id){return;} const pollId=pollElements[0].id.split('-')[1];poll_vote(pollId);}else{console.log("No poll elements found with id starting with 'polls-'");}}} document.addEventListener('DOMContentLoaded',function(){submitPollAnswer();});