]> jfr.im git - irc/quakenet/qwebirc.git/blobdiff - bin/pagegen.py
try to use a better reactor than select on unix
[irc/quakenet/qwebirc.git] / bin / pagegen.py
index c89102c51df15c054cb90b17e63c1206d7757660..4bd950d8841b6929503f20889daeadfb5287f4cf 100755 (executable)
@@ -56,9 +56,18 @@ 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>