mirror of https://github.com/dirtbags/moth.git
Get rid of onload HTML thing
This commit is contained in:
parent
a7974758f0
commit
935b9b1fb9
|
@ -157,6 +157,9 @@ def main():
|
||||||
if opts.html:
|
if opts.html:
|
||||||
hdr = ('<script type="application/javascript" src="plot.js"></script>'
|
hdr = ('<script type="application/javascript" src="plot.js"></script>'
|
||||||
'<script type="application/javascript" src="myplot.js"></script>'
|
'<script type="application/javascript" src="myplot.js"></script>'
|
||||||
|
'<script type="application=javascript">'
|
||||||
|
'window.onload = function () { draw("history"); };'
|
||||||
|
'</script>'
|
||||||
'<meta http-equiv="refresh" content="60" />')
|
'<meta http-equiv="refresh" content="60" />')
|
||||||
body = chart.make_table()
|
body = chart.make_table()
|
||||||
body += '\n<canvas id="history"></canvas>'
|
body += '\n<canvas id="history"></canvas>'
|
||||||
|
|
|
@ -19,7 +19,6 @@ def substitute(title, body, base=base, hdr='', body_class='', onload='', links='
|
||||||
body_class=body_class,
|
body_class=body_class,
|
||||||
base=base,
|
base=base,
|
||||||
links=links,
|
links=links,
|
||||||
onload=onload,
|
|
||||||
body=body)
|
body=body)
|
||||||
|
|
||||||
def serve(title, body, **kwargs):
|
def serve(title, body, **kwargs):
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<link rel="stylesheet" href="${base}ctf.css" type="text/css" />
|
<link rel="stylesheet" href="${base}ctf.css" type="text/css" />
|
||||||
$hdr
|
$hdr
|
||||||
</head>
|
</head>
|
||||||
<body class="$body_class" onload="$onload">
|
<body class="$body_class">
|
||||||
<h1>$title</h1>
|
<h1>$title</h1>
|
||||||
<div id="navigation">
|
<div id="navigation">
|
||||||
<ul>
|
<ul>
|
||||||
|
|
Loading…
Reference in New Issue