Skip to content

Instantly share code, notes, and snippets.

@aerith
Created September 26, 2011 14:12
Show Gist options
  • Save aerith/1242326 to your computer and use it in GitHub Desktop.
Save aerith/1242326 to your computer and use it in GitHub Desktop.
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script>
<script type="text/javascript" src="https://raw.github.com/aerith/harukaze/master/src/harukaze.js"></script>
<script type="text/javascript" src="https://raw.github.com/aerith/harukaze/master/src/harukaze.trigger.js"></script>
<script type="text/javascript" src="https://raw.github.com/aerith/harukaze/master/src/harukaze.logger.js"></script>
</head>
<body>
<style type="text/css">
.harukaze-logger-log {
color: #fff;
border-radius: 6px;
width: 500px;
overflow: hidden;
margin: 10px;
padding: 6px;
}
.harukaze-logger-log-info {
background: #666;
}
.harukaze-logger-log-notice {
background: #66f;
}
.harukaze-logger-log-warn {
background: #396;
}
.harukaze-logger-log-error {
background: #f06;
}
</style>
<script type="text/javascript">
(function (ns, w, d, $) {
var harukaze = $.extend({}, ns.harukaze);
$(d).ready(function () {
harukaze.logger.useNative = false;
setTimeout(function () { harukaze.logger.info('aaaaaa'); }, 500);
setTimeout(function () { harukaze.logger.notice('iiiiii'); }, 1000);
setTimeout(function () { harukaze.logger.warn('uuuuuu'); }, 1500);
setTimeout(function () { harukaze.logger.error('eeeeee'); }, 2000);
});
})(this, window, document, jQuery);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment