Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,6 +59,10 @@ def run_script(url: str, height: int, width: int, check_b,check_h):
|
|
| 59 |
print (page.text)
|
| 60 |
|
| 61 |
js="""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
function toggleTheme() {
|
| 63 |
console.log(localStorage.getItem('theme'))
|
| 64 |
if (localStorage.getItem('theme') === 'theme-dark'){
|
|
|
|
| 59 |
print (page.text)
|
| 60 |
|
| 61 |
js="""
|
| 62 |
+
function setTheme(themeName) {
|
| 63 |
+
localStorage.setItem('theme', themeName);
|
| 64 |
+
document.documentElement.className = themeName;
|
| 65 |
+
}
|
| 66 |
function toggleTheme() {
|
| 67 |
console.log(localStorage.getItem('theme'))
|
| 68 |
if (localStorage.getItem('theme') === 'theme-dark'){
|