File size: 620 Bytes
e28c9e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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";