Skip to content

Instantly share code, notes, and snippets.

@valueof
Created June 9, 2011 01:41
Show Gist options
  • Save valueof/1015863 to your computer and use it in GitHub Desktop.
Save valueof/1015863 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<title>DISQUS JavaScript Tests</title>
<!-- Hiro files -->
<link rel="stylesheet" href="css/tests/hiro.css">
<script src="js/tests/ender.js"></script>
<script src="js/tests/hiro.js"></script>
<script src="js/tests/web.js"></script>
</head>
<body onload="hiro.autorun();">
<h1>DISQUS JavaScript Tests</h1>
<!-- Hiro container (web.js needs this) -->
<div id="web">
</div>
<div id="footer">
(music, movies, microcode)
</div>
<!-- Our fixture -->
<textarea class="fixture" data-name="json">
<html>
<head>
<script>
var isReady = false;
// A bunch of disqus configuration variables here,
// They are irrelevant for our example.
function disqus_config() {
DISQUS.once('thread.onReady', function () {
// This function will be called when Disqus is fully loaded
isReady = true;
});
}
</script>
</head>
<body>
<div id="disqus_thread"></div>
<script>
// Normal Disqus snippet here
(function (doc) {
var dsq = doc.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = 'http://test.disqus/embed.js';
(document.getElementsByTagName('head')[0] ||
document.getElementsByTagName('body')[0]).appendChild(dsq);
}(document));
</script>
</body>
</html>
</textarea>
<!-- Our unit tests -->
<script src="js/tests/unit/json.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment