Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions umalauncher/carrotjuicer.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,10 +885,19 @@ def setup_helper_page(browser: horsium.BrowserWindow):

# Enable all cards
browser.execute_script("""document.querySelector("[class^='filters_settings_button_']").click()""")
all_cards_enabled = browser.execute_script("""return document.getElementById("allAtOnceCheckbox").checked;""")
if not all_cards_enabled:
browser.execute_script("""document.getElementById("allAtOnceCheckbox").click()""")
browser.execute_script("""document.querySelector("[class^='filters_confirm_button_']").click()""")
#TODO: The webdriver code should probably be refactored to handle waits better
timeout = 3
while not browser.execute_script("""return document.getElementById("allAtOnceCheckbox");"""):
time.sleep(0.125)
timeout -= 0.125
if timeout <= 0:
logger.error("Timeout waiting for allAtOnceCheckbox to appear.")
break
if timeout > 0:
all_cards_enabled = browser.execute_script("""return document.getElementById("allAtOnceCheckbox").checked;""")
if not all_cards_enabled:
browser.execute_script("""document.getElementById("allAtOnceCheckbox").click()""")
browser.execute_script("""document.querySelector("[class^='filters_confirm_button_']").click()""")

gametora_remove_cookies_banner(browser)
gametora_close_ad_banner( browser )
Expand Down
2 changes: 1 addition & 1 deletion umalauncher/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import gui
import glob

VERSION = "1.16.10"
VERSION = "1.16.11"

def parse_version(version_string: str):
"""Convert version string to tuple."""
Expand Down
Loading