0

そこで、次のようなスクリプトを作成したいと思います。

window.location = "http://m.roblox.com/Catalog/VerifyPurchase?assetid=122174821&type=robux&expectedPrice=1"
document.getElementsByClassName('buyButtonClass')[1].click()

しかし、手動で再度入力しなくても、ページを更新してコードを最初からやり直す方法がわかりません ありがとう

ちなみに、Google Chrome Dev で実行されます。ツール コンソール

私は試した

function blah() {
// window.location = "http://m.roblox.com/Catalog/VerifyPurchase?
assetid=122174821&type=robux&expectedPrice=1"
document.getElementsByClassName('buyButtonClass')[1].click()
if (some_condition) {
blah() // rerun the code
}
}

出力は「未定義」で、スクリプトは何もしませんでした。

スクリプトはリンクに移動し、ボタンをクリックします (現在、何らかの理由でクリックしません)。その後、スクリプトを再起動します (機能しません)。

4

1 に答える 1