Greasy Fork is available in English.

討論 » 建立請求

Search and click button every interval.

§
發表於:2018-07-26
編輯:2018-07-26

Search and click button every interval.

Hello, I need a script that will be clicking button every 610 seconds.

Button html code: <button class="gold_button option" data-option="soulfight">Walka</button>

Script should look for data-attribute, not class name.

§
發表於:2018-11-06
setInterval(function() {
    let t = document.querySelector('button[data-option="soulfight"]');
    t && t.click();
}, 610 * 1e3);
§
發表於:2018-11-21

/ConfirmeIf/ setInterval(function(){ if (document.querySelector('your selector') !=null) {document.querySelector("your selector").click()} }, 610000);

§
發表於:2018-11-21

If you don't know how get the selector. right click in your element►Inspecter then right clique in the element. you will find copy SELECTOR

§
發表於:2018-11-21

發表回覆

登入以回復