Explorar el Código

[enh] HTTP GET theme select

Adam Tauber hace 10 años
padre
commit
22a3cf7ac7
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3
    1
      searx/webapp.py

+ 3
- 1
searx/webapp.py Ver fichero

@@ -113,7 +113,9 @@ def get_current_theme_name(override=None):
113 113
 
114 114
     if override and override in themes:
115 115
         return override
116
-    theme_name = request.cookies.get('theme', default_theme)
116
+    theme_name = request.args.get('theme',
117
+                                  request.cookies.get('theme',
118
+                                                      default_theme))
117 119
     if theme_name not in themes:
118 120
         theme_name = default_theme
119 121
     return theme_name