From 900213e16e54e77389244106f372a02e6f8a2dd1 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 30 Jul 2024 09:45:06 -0400 Subject: [PATCH] examples: Pop up the console on new output for three seconds if hidden. --- examples/template.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/template.html b/examples/template.html index 3e3c487275..902f0ff497 100644 --- a/examples/template.html +++ b/examples/template.html @@ -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, "&");