tixcraft_bot/webdriver/Maxbotplus_1.0.0/js/common.js

32 lines
1.1 KiB
JavaScript
Raw Normal View History

2024-01-06 17:44:06 +00:00
function get_target_area_with_order(settings, matched_block)
{
//console.log(settings);
let target_area = [];
if(settings.area_auto_select.mode=="from top to bottom")
target_area = matched_block.first();
if(settings.area_auto_select.mode=="from bottom to top")
target_area = matched_block.last();
if(settings.area_auto_select.mode=="center")
target_area = matched_block.first();
if(settings.area_auto_select.mode=="random")
target_area = matched_block.first();
return target_area;
}
function get_target_date_with_order(settings, matched_block)
{
//console.log(settings);
let target_area = [];
2024-01-08 02:32:17 +00:00
if(settings.date_auto_select.mode=="from top to bottom")
2024-01-06 17:44:06 +00:00
target_date = matched_block.first();
2024-01-08 02:32:17 +00:00
if(settings.date_auto_select.mode=="from bottom to top")
2024-01-06 17:44:06 +00:00
target_date = matched_block.last();
2024-01-08 02:32:17 +00:00
if(settings.date_auto_select.mode=="center")
2024-01-06 17:44:06 +00:00
target_date = matched_block.first();
2024-01-08 02:32:17 +00:00
if(settings.date_auto_select.mode=="random")
2024-01-06 17:44:06 +00:00
target_date = matched_block.first();
return target_area;
}