Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,12 +60,14 @@ def run_script(url: str, height: int, width: int, check_b,check_h):
|
|
| 60 |
|
| 61 |
js="""
|
| 62 |
function toggleTheme() {
|
|
|
|
| 63 |
if (localStorage.getItem('theme') === 'theme-dark'){
|
| 64 |
setTheme('theme-light');
|
| 65 |
} else {
|
| 66 |
setTheme('theme-dark');
|
| 67 |
}
|
| 68 |
-
}
|
|
|
|
| 69 |
"""
|
| 70 |
|
| 71 |
driver.execute_script(js)
|
|
|
|
| 60 |
|
| 61 |
js="""
|
| 62 |
function toggleTheme() {
|
| 63 |
+
console.log(localStorage.getItem('theme'))
|
| 64 |
if (localStorage.getItem('theme') === 'theme-dark'){
|
| 65 |
setTheme('theme-light');
|
| 66 |
} else {
|
| 67 |
setTheme('theme-dark');
|
| 68 |
}
|
| 69 |
+
};
|
| 70 |
+
toggleTheme()
|
| 71 |
"""
|
| 72 |
|
| 73 |
driver.execute_script(js)
|