2015-07-07 18:09:44 +03:00
|
|
|
<script>
|
|
|
|
var ChromeSamples = {
|
|
|
|
log: function() {
|
2015-07-21 21:11:33 +03:00
|
|
|
var line = Array.prototype.slice.call(arguments).map(function(argument) {
|
|
|
|
return typeof argument === 'string' ? argument : JSON.stringify(argument);
|
|
|
|
}).join(' ');
|
|
|
|
|
|
|
|
document.querySelector('#log').textContent += line + '\n';
|
2015-07-07 18:09:44 +03:00
|
|
|
},
|
|
|
|
|
2015-07-22 20:52:06 +03:00
|
|
|
clearLog: function() {
|
|
|
|
document.querySelector('#log').textContent = '';
|
|
|
|
},
|
|
|
|
|
2015-07-07 18:09:44 +03:00
|
|
|
setStatus: function(status) {
|
|
|
|
document.querySelector('#status').textContent = status;
|
|
|
|
},
|
|
|
|
|
|
|
|
setContent: function(newContent) {
|
|
|
|
var content = document.querySelector('#content');
|
|
|
|
while(content.hasChildNodes()) {
|
|
|
|
content.removeChild(content.lastChild);
|
|
|
|
}
|
|
|
|
content.appendChild(newContent);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<h3>Live Output</h3>
|
|
|
|
<div id="output" class="output">
|
|
|
|
<div id="content">{{ include.initial_output_content }}</div>
|
|
|
|
<div id="status"></div>
|
|
|
|
<pre id="log"></pre>
|
|
|
|
</div>
|