]> jfr.im git - irc/quakenet/qwebirc.git/blobdiff - bin/pagegen.py
fix debug javascript ending up in css
[irc/quakenet/qwebirc.git] / bin / pagegen.py
index 862082e3f63880f23660b7e778bd27e2ef95b8e0..4bd950d8841b6929503f20889daeadfb5287f4cf 100755 (executable)
@@ -56,16 +56,25 @@ def producehtml(name, debug):
   csshtml = "\n".join("  <link rel=\"stylesheet\" href=\"%s%s\" type=\"text/css\"/>" % (config.STATIC_BASE_URL, x) for x in css)
   jshtml = "\n".join("  <script type=\"text/javascript\" src=\"%s%s\"></script>" % (config.STATIC_BASE_URL, x) for x in js)
 
+  if hasattr(config, "ANALYTICS_HTML"):
+    jshtml+="\n" + config.ANALYTICS_HTML
+
   div = ui.get("div", "")
   customjs = ui.get("customjs", "")
 
+  if debug:
+    customjs = """<script type="text/javascript">
+QWEBIRC_DEBUG = true;
+</script>
+""" + customjs
+
   return """%s
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
   <base />
   <title>%s (qwebirc)</title>
   <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-  <link rel="icon" type="image/png" href="%simages/favicon.png"/>
+  <link rel="shortcut icon" type="image/png" href="%simages/favicon.png"/>
 %s%s
 %s
   <script type="text/javascript">