2024-04-11, add bank register event
parent
09dfb6b9cf
commit
05a98fe0f1
|
@ -44,7 +44,7 @@ except Exception as exc:
|
||||||
print(exc)
|
print(exc)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.04.10)"
|
CONST_APP_VERSION = "MaxBot (2024.04.11)"
|
||||||
|
|
||||||
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
||||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||||
|
|
|
@ -24,7 +24,7 @@ import webbrowser
|
||||||
|
|
||||||
import util
|
import util
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.04.09)"
|
CONST_APP_VERSION = "MaxBot (2024.04.11)"
|
||||||
|
|
||||||
CONST_MAXBOT_LAUNCHER_FILE = "config_launcher.json"
|
CONST_MAXBOT_LAUNCHER_FILE = "config_launcher.json"
|
||||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||||
|
|
|
@ -32,7 +32,7 @@ except Exception as exc:
|
||||||
print(exc)
|
print(exc)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.04.10)"
|
CONST_APP_VERSION = "MaxBot (2024.04.11)"
|
||||||
|
|
||||||
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
||||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
"auto_guess_options": true,
|
"auto_guess_options": true,
|
||||||
"user_guess_string": "",
|
"user_guess_string": "",
|
||||||
"remote_url": "\"http://127.0.0.1:16888/\"",
|
"remote_url": "\"http://127.0.0.1:16888/\"",
|
||||||
"auto_reload_page_interval": 0.0,
|
"auto_reload_page_interval": 0.2,
|
||||||
"reset_browser_interval": 0,
|
"reset_browser_interval": 0,
|
||||||
"kktix_status_api": false,
|
"kktix_status_api": false,
|
||||||
"max_dwell_time": 60,
|
"max_dwell_time": 60,
|
||||||
|
|
|
@ -34,7 +34,7 @@ try:
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.04.10)"
|
CONST_APP_VERSION = "MaxBot (2024.04.11)"
|
||||||
|
|
||||||
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
||||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||||
|
@ -670,7 +670,7 @@ def get_default_config():
|
||||||
config_dict["advanced"]["user_guess_string"] = ""
|
config_dict["advanced"]["user_guess_string"] = ""
|
||||||
config_dict["advanced"]["remote_url"] = "http://127.0.0.1:%d/" % (CONST_SERVER_PORT)
|
config_dict["advanced"]["remote_url"] = "http://127.0.0.1:%d/" % (CONST_SERVER_PORT)
|
||||||
|
|
||||||
config_dict["advanced"]["auto_reload_page_interval"] = 0
|
config_dict["advanced"]["auto_reload_page_interval"] = 0.2
|
||||||
config_dict["advanced"]["reset_browser_interval"] = 0
|
config_dict["advanced"]["reset_browser_interval"] = 0
|
||||||
config_dict["advanced"]["kktix_status_api"] = False
|
config_dict["advanced"]["kktix_status_api"] = False
|
||||||
config_dict["advanced"]["max_dwell_time"] = 60
|
config_dict["advanced"]["max_dwell_time"] = 60
|
||||||
|
@ -2749,7 +2749,7 @@ def settgins_gui_timer():
|
||||||
preview_question_text_file()
|
preview_question_text_file()
|
||||||
update_maxbot_runtime_status()
|
update_maxbot_runtime_status()
|
||||||
change_maxbot_status_by_keyword()
|
change_maxbot_status_by_keyword()
|
||||||
time.sleep(0.3)
|
time.sleep(0.4)
|
||||||
if GLOBAL_SERVER_SHUTDOWN:
|
if GLOBAL_SERVER_SHUTDOWN:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
const storage = chrome.storage.local;
|
||||||
|
var settings = null;
|
||||||
|
var inputInterval = null;
|
||||||
|
|
||||||
|
function hncb_main(settings) {
|
||||||
|
let is_text_sent = false;
|
||||||
|
let user_guess_string_array = [];
|
||||||
|
if(settings) {
|
||||||
|
if(settings.advanced.user_guess_string.length > 0) {
|
||||||
|
if(settings.advanced.user_guess_string!='""') {
|
||||||
|
user_guess_string_array = JSON.parse('[' + settings.advanced.user_guess_string +']');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let target_row=null;
|
||||||
|
let all_row = $("input[name='IDNO']");
|
||||||
|
if (all_row.length > 0 && user_guess_string_array.length > 0)
|
||||||
|
{
|
||||||
|
//console.log("input count:" + all_row.length);
|
||||||
|
let travel_index=0;
|
||||||
|
all_row.each(function ()
|
||||||
|
{
|
||||||
|
let current_index = all_row.index(this);
|
||||||
|
//console.log("current_index:" + current_index);
|
||||||
|
if(current_index+1 <= user_guess_string_array.length) {
|
||||||
|
//console.log("input data:" + user_guess_string_array[current_index]);
|
||||||
|
console.log("input value:" + $(this).val());
|
||||||
|
if($(this).val()=="") {
|
||||||
|
if(user_guess_string_array[current_index].length) {
|
||||||
|
$(this).val(user_guess_string_array[current_index]);
|
||||||
|
is_text_sent = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
is_text_sent = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if(is_text_sent) {
|
||||||
|
console.log("start focus");
|
||||||
|
document.querySelector("#TrxCaptchaKey").focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
return is_text_sent;
|
||||||
|
}
|
||||||
|
|
||||||
|
storage.get('settings', function (items)
|
||||||
|
{
|
||||||
|
if (items.settings)
|
||||||
|
{
|
||||||
|
settings = items.settings;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
storage.get('status', function (items)
|
||||||
|
{
|
||||||
|
if (items.status && items.status=='ON')
|
||||||
|
{
|
||||||
|
inputInterval= setInterval(() => {
|
||||||
|
hncb_main(settings);
|
||||||
|
}, 200);
|
||||||
|
} else {
|
||||||
|
//console.log('maxbot status is not ON');
|
||||||
|
}
|
||||||
|
});
|
|
@ -453,6 +453,16 @@
|
||||||
"jquery.min.js",
|
"jquery.min.js",
|
||||||
"js/kktix_registrations_reload.js"
|
"js/kktix_registrations_reload.js"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"matches": [
|
||||||
|
"https://netbank.hncb.com.tw/netbank/servlet/TrxDispatcher?trx=com.lb.wibc.trx.CardPromoteOverall_RWD&state=prompt"
|
||||||
|
],
|
||||||
|
"run_at": "document_start",
|
||||||
|
"js": [
|
||||||
|
"jquery.min.js",
|
||||||
|
"js/hncb_fill.js"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"version": "1.0.25"
|
"version": "1.0.25"
|
||||||
|
|
Loading…
Reference in New Issue