Run dark mode script hack based on configuration parameter

This commit is contained in:
Alain Hernandez 2020-12-19 18:58:51 -05:00
parent a007681f72
commit a404b5a34f

View File

@ -261,6 +261,11 @@ class Parser:
)
return
# light theme is on by default
# enable dark mode based on https://fruitionsite.com/ dark mode hack
if self.config.get('theme') == 'dark':
self.driver.execute_script("__console.environment.ThemeStore.setState({ mode: 'dark' });")
# scroll at the bottom of the notion-scroller element to load all elements
# continue once there are no changes in height after a timeout
# don't do this if the page has a calendar databse on it or it will load forever