更新 pokemon_cafe.js

add step3 case
This commit is contained in:
2024-06-28 09:16:26 +00:00
parent d840aa1f70
commit b787b8e2bb

View File

@@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name pokemon_cafe_script // @name pokemon_cafe_script
// @namespace https://git.moonjuice.tw/moonjuice/pokemon_script // @namespace https://git.moonjuice.tw/moonjuice/pokemon_script
// @version 2024-06-26 // @version 2024-06-28
// @description try to take over the world! // @description try to take over the world!
// @author moonjuice // @author moonjuice
// @match https://reserve.pokemon-cafe.jp/* // @match https://reserve.pokemon-cafe.jp/*
@@ -66,23 +66,22 @@
console.log('no seat'); console.log('no seat');
$('.button.button-secondary')[0].click(); $('.button.button-secondary')[0].click();
} }
} else if ('/reserve/step3' == location.pathname) {
$('input[id=name]')[0].value='name';
$('input[id=name_kana]')[0].value='name';
$('input[id=phone_number]')[0].value='phone';
$('input[id=email]')[0].value='email';
} else { } else {
/*if (GM_getValue('seatId') != -1) { /*if (GM_getValue('seatId') != -1) {
alert('快!!'); alert('快!!');
}*/ }*/
console.log(GM_getValue('seat')); console.log(GM_getValue('seat'));
console.log(GM_getValue('seatId')); console.log(GM_getValue('seatId'));
$('input[name=name]')[0].value='name';
$('input[name=name_kana]')[0].value='name';
$('input[name=phone_number]')[0].value='phone';
$('input[name=email]')[0].value='email';
} }
})(); })();
function chooseSeat() { function chooseSeat() {
var seatId = -1; var seatId = -1;
GM_setValue('seat', '0');
GM_setValue('seatId', seatId);
if ($('.post-link').length && $('.post-link').length > 0) { if ($('.post-link').length && $('.post-link').length > 0) {
var c_seats = Array.from($('.post-link')).filter((element) => element.text.includes('C')); var c_seats = Array.from($('.post-link')).filter((element) => element.text.includes('C'));
var d_seats = Array.from($('.post-link')).filter((element) => element.text.includes('D')); var d_seats = Array.from($('.post-link')).filter((element) => element.text.includes('D'));