From d646eed45b5e20be0f17835be60e852847ba03f0 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Mon, 21 Oct 2024 18:04:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'test.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test.js b/test.js index 000eab22..3ba48724 100644 --- a/test.js +++ b/test.js @@ -7,12 +7,15 @@ d.push({ pic_url: "", extra: { js: $.toString(() => { - fy_bridge_app.log(location.href); + //fy_bridge_app.log(location.href); function check() { fy_bridge_app.log("check"); - let src = document.querySelectorAll("iframe")[1]; - if (src) { - location.href = src.src; + let iframes = document.querySelectorAll("iframe"); + for(var i = 0; i < iframes.length; i++) { + fy_bridge_app.log(iframes[i].src); + } + if (iframes[1]) { + location.href = iframes.src; } else { setTimeout(check, 200); }