diff --git a/templates/support/footer.mako b/templates/support/footer.mako
index 153f07c..e318b83 100644
--- a/templates/support/footer.mako
+++ b/templates/support/footer.mako
@@ -11,7 +11,7 @@
Maintained by Ben Kurtovic
API
Source code
- % if ("CopyviosBackground" in g.cookies and g.cookies["CopyviosBackground"].value in ["potd", "list"]) or "CopyviosBackground" not in g.cookies:
+ % if g.descurl:
Background image
% endif
diff --git a/templates/support/header.mako b/templates/support/header.mako
index d6e7a76..ccab414 100644
--- a/templates/support/header.mako
+++ b/templates/support/header.mako
@@ -1,7 +1,11 @@
<%page args="title, splash=False"/>\
<%!
- from flask import g, request, url_for
- from copyvios.background import set_background
+ from flask import request, url_for
+ from copyvios.background import get_background
+ from copyvios.cookies import get_cookies
+%>\
+<%
+ cookies = get_cookies()
%>\
@@ -15,11 +19,11 @@
-<% selected = g.cookies["CopyviosBackground"].value if "CopyviosBackground" in g.cookies else "list" %>\
+<% selected = cookies["CopyviosBackground"].value if "CopyviosBackground" in cookies else "list" %>\
% if selected == "plain":
% else:
-
+
% endif