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ファンクラブのトップページに移動してからもう一度実行してください'}; } }