| const target = arguments[0]; | |
| const iframe = document.getElementById("ifra"); | |
| if (!iframe) { | |
| return "no"; | |
| } | |
| const iframeDoc = iframe.contentDocument || iframe.contentWindow.document; | |
| if (!iframeDoc) { | |
| return "no"; | |
| } | |
| const rows = iframeDoc.querySelectorAll("#xirxkxkbody tr"); | |
| for (const row of rows) { | |
| const cells = row.querySelectorAll("td"); | |
| if (cells.length < 3) { | |
| continue; | |
| } | |
| const rowText = cells[2].innerText.trim(); | |
| if (!rowText.includes(target)) { | |
| continue; | |
| } | |
| const picker = cells[0].querySelector("input"); | |
| if (picker) { | |
| picker.click(); | |
| return "yes"; | |
| } | |
| } | |
| return "no"; | |