maxbot plus 1.0.6, update for ticketmaster.sg
parent
7631133b8f
commit
803e5e5e14
|
@ -0,0 +1,84 @@
|
|||
const storage = chrome.storage.local;
|
||||
var settings = null;
|
||||
|
||||
$("footer").remove();
|
||||
|
||||
function ticketmaster_assign_ticket_number(settings)
|
||||
{
|
||||
let ticket_options = $("#ticketPriceList select:first option");
|
||||
if (ticket_options.length)
|
||||
{
|
||||
let is_ticket_number_assign = false;
|
||||
if (settings.ticket_number > 0)
|
||||
{
|
||||
ticket_options.each(function ()
|
||||
{
|
||||
if ($(this).val() == settings.ticket_number)
|
||||
{
|
||||
$(this).prop('selected', true);
|
||||
is_ticket_number_assign = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (!is_ticket_number_assign)
|
||||
{
|
||||
ticket_options.last().prop('selected', true);
|
||||
}
|
||||
$("#autoMode").click();
|
||||
}
|
||||
}
|
||||
|
||||
var myInterval = null;
|
||||
|
||||
function ticketmaster_select_box_ready(settings)
|
||||
{
|
||||
let ret = false;
|
||||
let form_select = $("table#ticketPriceList tbody tr td select.form-select");
|
||||
if (form_select.length > 0)
|
||||
{
|
||||
ret = true;
|
||||
if (myInterval)
|
||||
clearInterval(myInterval);
|
||||
ticketmaster_assign_ticket_number(settings);
|
||||
}
|
||||
//console.log("select_box_ready:"+ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
storage.get('settings', function (items)
|
||||
{
|
||||
if (items.settings)
|
||||
{
|
||||
settings = items.settings;
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log('no settings found');
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
storage.get('status', function (items)
|
||||
{
|
||||
if (items.status && items.status == 'ON')
|
||||
{
|
||||
//console.log("ticket_number:"+ settings.ticket_number);
|
||||
if (settings.ticket_number > 0)
|
||||
{
|
||||
if (!ticketmaster_select_box_ready(settings))
|
||||
{
|
||||
myInterval = setInterval(() =>
|
||||
{
|
||||
ticketmaster_select_box_ready(settings);
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log('no status found');
|
||||
}
|
||||
}
|
||||
);
|
|
@ -87,13 +87,13 @@ function tixcraft_assign_ticket_number(settings)
|
|||
});
|
||||
}
|
||||
|
||||
let $ticket_options = target_row.find("option");
|
||||
if ($ticket_options.length)
|
||||
let ticket_options = target_row.find("option");
|
||||
if (ticket_options.length)
|
||||
{
|
||||
let is_ticket_number_assign = false;
|
||||
if (settings.ticket_number > 0)
|
||||
{
|
||||
$ticket_options.each(function ()
|
||||
ticket_options.each(function ()
|
||||
{
|
||||
if ($(this).val() == settings.ticket_number)
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ function tixcraft_assign_ticket_number(settings)
|
|||
}
|
||||
if (!is_ticket_number_assign)
|
||||
{
|
||||
$ticket_options.last().prop('selected', true);
|
||||
ticket_options.last().prop('selected', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -204,14 +204,6 @@ storage.get('settings', function (items)
|
|||
}
|
||||
});
|
||||
|
||||
storage.get('settings', function (items)
|
||||
{
|
||||
if (items.settings)
|
||||
{
|
||||
settings = items.settings;
|
||||
}
|
||||
});
|
||||
|
||||
storage.get('status', function (items)
|
||||
{
|
||||
if (items.status && items.status=='ON')
|
||||
|
|
|
@ -82,6 +82,16 @@
|
|||
"js/tixcraft_game.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
"https://ticketmaster.sg/ticket/area/*"
|
||||
],
|
||||
"run_at": "document_end",
|
||||
"js": [
|
||||
"jquery.min.js",
|
||||
"js/ticketmaster_area.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
"https://tixcraft.com/ticket/area/*",
|
||||
|
@ -100,7 +110,8 @@
|
|||
"https://tixcraft.com/ticket/ticket/*",
|
||||
"https://www.indievox.com/ticket/ticket/*",
|
||||
"https://indievox.com/ticket/ticket/*",
|
||||
"https://ticketmaster.sg/ticket/ticket/*"
|
||||
"https://ticketmaster.sg/ticket/ticket/*",
|
||||
"https://ticketmaster.sg/ticket/check-captcha/*"
|
||||
],
|
||||
"run_at": "document_end",
|
||||
"js": [
|
||||
|
@ -355,5 +366,5 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"version": "1.0.5"
|
||||
"version": "1.0.6"
|
||||
}
|
Loading…
Reference in New Issue