examples: Pop up the console on new output for three seconds if hidden.

This commit is contained in:
Ryan C. Gordon 2024-07-30 09:45:06 -04:00
parent 6559cfb143
commit 900213e16e
No known key found for this signature in database
GPG Key ID: FA148B892AB48044

View File

@ -156,6 +156,12 @@
var element = document.getElementById('output');
if (element) element.value = ''; // clear browser cache
return function(text) {
var elem = document.getElementById('output-container');
if (elem.style['top'] == '') {
elem.style['top'] = '50%';
setTimeout(function() { elem.style['top'] = ''; }, 3000);
}
if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
// These replacements are necessary if you render to raw HTML
//text = text.replace(/&/g, "&");