From aece02b1761bdfea49c394d57f09abc48df390ff Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Thu, 5 Dec 2024 18:10:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJyMethod.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJyMethod.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/SrcJyMethod.js b/SrcJyMethod.js index eba1f421..93a5bc74 100644 --- a/SrcJyMethod.js +++ b/SrcJyMethod.js @@ -16,17 +16,26 @@ function extraJS(playUrl) { check(); },p1,p2) } - function click2(p1) { - return $.toString((p1) => { + function click2() { + return $.toString(() => { function check() { try { - document.querySelector(p1).click(); + // 获取所有具有 id 属性的元素 + var elementsWithId = document.querySelectorAll('[id]'); + + // 遍历每个元素,检查文本内容并触发点击事件 + elementsWithId.forEach(function(element) { + // 检查元素的文本内容是否包含 "点击播放" + if (element.textContent.includes("点击播放")) { + element.click(); + } + }); } catch (e) { setTimeout(check, 100); } } check(); - },p1) + }) } if(/jqqzx\.me|dadazhu\.me/.test(playUrl)){ return click1('#playleft iframe','#start'); @@ -43,7 +52,7 @@ function extraJS(playUrl) { "Referer": playUrl } }); - return click2('#iudljxfb'); + return click2(); }else{ return undefined; }