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>" % ("" if x.startswith("//") else 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", "")
<title>%s (qwebirc)</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<link rel="shortcut icon" type="image/png" href="%simages/favicon.png"/>
-%s%s
+%s<script type="text/javascript">QWEBIRC_DEBUG=%s;</script>%s
%s
<script type="text/javascript">
var ui = new qwebirc.ui.Interface("ircui", qwebirc.ui.%s, %s);
</div>
</body>
</html>
-""" % (ui["doctype"], config.APP_TITLE, config.STATIC_BASE_URL, csshtml, customjs, jshtml, ui["class"], optionsgen.get_options(), div)
+""" % (ui["doctype"], config.APP_TITLE, config.STATIC_BASE_URL, csshtml, debug and "true" or "false", customjs, jshtml, ui["class"], optionsgen.get_options(), div)
def main(outputdir=".", produce_debug=True):
p = os.path.join(outputdir, "static")