From 864969810441c99203a7f04991228f230ba26187 Mon Sep 17 00:00:00 2001 From: skscript Date: Sat, 28 Oct 2023 12:53:12 +0900 Subject: [PATCH] =?UTF-8?q?kemono.user.js=20=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kemono.user.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kemono.user.js b/kemono.user.js index de8bdfe..e7dd54c 100644 --- a/kemono.user.js +++ b/kemono.user.js @@ -38,13 +38,15 @@ return {ok: match.groups.userid}; } else { + let result = undefined; document.querySelectorAll(".fanclub-name > a").forEach(element => { - console.log(element); + console.log(element, element.href); const match = element.href.match(re); if(match) { - return {ok: match.groups.userid}; + result = {ok: match.groups.userid}; } - }) + }); + if (result) { return result }; return {err: 'Try again in the top page of this fanclub.\nファンクラブのトップページに移動してからもう一度実行してください'}; } }