Initial debug pop-out window

This commit is contained in:
Nick O'Leary
2016-06-20 21:35:20 +01:00
parent a235745be7
commit ab31f34862
6 changed files with 98 additions and 56 deletions

View File

@@ -0,0 +1,6 @@
$(function() {
window.addEventListener('message',function(evt) {
console.log(evt.data);
$('<div>').text(evt.data).appendTo(document.body);
},false)
});

View File

@@ -0,0 +1,51 @@
#debug-content {
position: absolute;
top: 43px;
bottom: 0px;
left:0px;
right: 0px;
overflow-y: scroll;
}
.debug-message {
cursor: pointer;
border-bottom: 1px solid #eee;
border-left: 8px solid #eee;
border-right: 8px solid #eee;
padding: 2px;
}
.debug-message-date {
background: #fff;
font-size: 9px;
color: #aaa;
padding: 1px 5px 1px 1px;
}
.debug-message-topic {
display: block;
background: #fff;
padding: 1px;
font-size: 10px;
color: #a66;
}
.debug-message-name {
background: #fff;
padding: 1px 5px;
font-size: 9px;
color: #aac;
}
.debug-message-payload {
display: block;
padding: 2px;
background: #fff;
}
.debug-message-level-log {
border-left-color: #eee;
border-right-color: #eee;
}
.debug-message-level-30 {
border-left-color: #ffdf9d;
border-right-color: #ffdf9d;
}
.debug-message-level-20 {
border-left-color: #f99;
border-right-color: #f99;
}

View File

@@ -0,0 +1,8 @@
<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<body></body>
<script src="../../vendor/vendor-jquery.js"></script>
<script src="debug.js"></script>
</html>