Files
KaTeX/test/screenshotter/test.html
Emily Eisenberg 2f552af02d Make our own screenshotting script instead of using huxley
Summary:
Create our own screenshotting script which takes screenshots. This
improves over huxley for a couple reasons:
 - It makes the screenshots the correct size (for some reason, huxley struggles
   with this).
 - Its configuration matches more with what we want (we don't need multiple
   screenshots or interaction, we just want a single static shot)
 - It runs faster

I also changed the docs to reflect this change.

Test Plan:
 - Make sure all of the tests that were in the Huxleyfile are now in ss_data.json
 - Run the screenshotter docker
 - Make sure all of the images look reasonable and don't change (except
   sometimes the Lap test, which has some strange pixel-positioning
   differences...)

Reviewers: kevinb

Reviewed By: kevinb

Differential Revision: https://phabricator.khanacademy.org/D16731
2015-03-12 16:40:15 -07:00

33 lines
956 B
HTML

<!doctype html>
<html>
<head>
<title>Huxley test</title>
<script src="/katex.js" type="text/javascript"></script>
<link href="/katex.css" rel="stylesheet" type="text/css">
<style type="text/css">
#math, #pre, #post {
font-size: 4em;
}
</style>
</head>
<body>
<span id="pre"></span>
<span id="math"></span>
<span id="post"></span>
<script type="text/javascript">
var query = {};
var re = /(?:^\?|&)([^&=]+)(?:=([^&]+))?/g;
var match;
while (match = re.exec(window.location.search)) {
query[match[1]] = decodeURIComponent(match[2]);
}
var mathNode = document.getElementById("math");
katex.render(query["m"], mathNode, {
displayMode: !!query["display"]
});
document.getElementById("pre").innerHTML = query["pre"] || "";
document.getElementById("post").innerHTML = query["post"] || "";
</script>
</body>
</html>