2024-01-07, just change version code.
parent
a24c30fb86
commit
322ef1093b
|
@ -41,7 +41,7 @@ try:
|
|||
except Exception as exc:
|
||||
pass
|
||||
|
||||
CONST_APP_VERSION = "MaxBot (2024.01.06)"
|
||||
CONST_APP_VERSION = "MaxBot (2024.01.07)"
|
||||
|
||||
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||
|
@ -558,6 +558,7 @@ def clean_uc_exe_cache():
|
|||
return is_cache_exist
|
||||
|
||||
def dump_settins_to_maxbot_plus_extension(ext, config_dict):
|
||||
# sync config.
|
||||
target_path = ext
|
||||
target_path = os.path.join(target_path, "data")
|
||||
target_path = os.path.join(target_path, CONST_MAXBOT_CONFIG_FILE)
|
||||
|
@ -569,6 +570,7 @@ def dump_settins_to_maxbot_plus_extension(ext, config_dict):
|
|||
with open(target_path, 'w') as outfile:
|
||||
json.dump(config_dict, outfile)
|
||||
|
||||
# add host_permissions
|
||||
target_path = ext
|
||||
target_path = os.path.join(target_path, "manifest.json")
|
||||
|
||||
|
@ -601,6 +603,27 @@ def dump_settins_to_maxbot_plus_extension(ext, config_dict):
|
|||
with open(target_path, 'w') as outfile:
|
||||
outfile.write(json_str)
|
||||
|
||||
# show advanced rows in extension.
|
||||
target_path = ext
|
||||
target_path = os.path.join(target_path, "options.html")
|
||||
if os.path.isfile(target_path):
|
||||
file_options = open(target_path, 'r')
|
||||
html_lines = file_options.readlines()
|
||||
file_options.close()
|
||||
new_html_array = []
|
||||
my_target_row = ['remote_url_row','ocr_captcha_enable_row']
|
||||
for line in html_lines:
|
||||
for row in my_target_row:
|
||||
if row in line:
|
||||
line = line.replace('display: none;','')
|
||||
new_html_array.append(line)
|
||||
if len(new_html_array) > 0:
|
||||
print("output new options.html")
|
||||
with open(target_path, 'w') as outfile:
|
||||
outfile.write("".join(new_html_array))
|
||||
|
||||
|
||||
|
||||
|
||||
def get_uc_options(uc, config_dict, webdriver_path):
|
||||
options = uc.ChromeOptions()
|
||||
|
|
|
@ -22,7 +22,7 @@ import sys
|
|||
import threading
|
||||
import webbrowser
|
||||
|
||||
CONST_APP_VERSION = "MaxBot (2024.01.06)"
|
||||
CONST_APP_VERSION = "MaxBot (2024.01.07)"
|
||||
|
||||
CONST_MAXBOT_LAUNCHER_FILE = "config_launcher.json"
|
||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||
|
|
|
@ -38,7 +38,7 @@ try:
|
|||
except Exception as exc:
|
||||
pass
|
||||
|
||||
CONST_APP_VERSION = "MaxBot (2024.01.06)"
|
||||
CONST_APP_VERSION = "MaxBot (2024.01.07)"
|
||||
|
||||
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
"declarativeNetRequestFeedback"
|
||||
],
|
||||
"host_permissions": [
|
||||
"http://maxbot.dropboxlike.com:16888/*"
|
||||
"http://127.0.0.1:16888/*"
|
||||
],
|
||||
"web_accessible_resources": [
|
||||
{
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<div class="col-12" id="ocr_captcha_enable_row" style="">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="ocr_captcha_enable">
|
||||
<label class="form-check-label" for="ocr_captcha_enable">
|
||||
|
@ -104,7 +104,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<div class="col-12" id="remote_url_row" style="">
|
||||
<label for="remote_url" class="form-label">OCR Server URL</label>
|
||||
<input class="form-control" id="remote_url" value="" />
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue