1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 01:42:43 +03:00
semantic/prototype/UI/index.html
2015-10-09 14:27:44 -05:00

43 lines
1.1 KiB
HTML

<!doctype html>
<html>
<head>
<title>semantic-diff</title>
<style type="text/css">
#left {
position: absolute;
left: 0; top: 0;
width: 50%;
outline: 1px solid green;
}
#right {
position: absolute;
right: 0; top: 0;
width: 50%;
outline: 1px solid red;
}
</style>
<script type="text/javascript">
function loadJSON(path, callback) {
var request = new XMLHttpRequest();
request.overrideMimeType("application/json");
request.open('GET', '' + path, true);
request.onreadystatechange = function () {
if (request.readyState == 4 && (request.status == "200" || request.status == 0)) {
callback(JSON.parse(request.responseText));
}
};
request.send(null);
}
</script>
</head>
<body>
<div id="left"></div>
<div id="right"></div>
<script type="text/javascript">
loadJSON('Fixtures/swift.json', function (json) {
console.log(json);
});
</script>
</body>
</html>