Olá pessoal tudo bem?
Estou usando o Mooddle 3.2 e gostaria de tirar uma dúvida. Eu inseri o código abaixo através do admin Settings > Site administration > Appearance > Additional HTML:
=================================================================
<div id="resetcountdown" style="padding:3px 1em;text-aling:center;position:fixed;bottom:0;right:0;overflow: hidden;" />
<script>
Y.use('node', function (Y) {
// The number of seconds after the whole hour we want to count down to.
var countdown = 3600;
var updateTimer = function () {
var now = Math.floor(new Date().getTime() / 1000),
last = now - (now % countdown),
next = last + countdown;
displayRemainingTime(next - now);
setTimeout(updateTimer, 1000);
};
var displayRemainingTime = function (seconds) {
var timer = Y.one('#resetcountdown'),
display, hours, mins, secs,
text = 'This site will be reset in ';
display = new Date(1970, 0, 1);
display.setSeconds(seconds);
secs = display.getSeconds();
mins = display.getMinutes();
hours = Math.floor((seconds - mins * 3600 - secs * 60) / 60 / 60);
if (hours > 0) {
text += ('0' + hours).slice(-2) + ' hours ';
}
text += ('0' + mins).slice(-2) + ' mins ' + ('0' + secs).slice(-2) + ' secs';
timer.set('text', text);
if (seconds < 300) {
timer.setStyle('backgroundColor', 'red')
.setStyle('fontWeight', 'bold');
} else {
timer.setStyle('backgroundColor', '#ffd3d9')
.setStyle('fontWeight', 'normal'); } };
updateTimer();});
</script>
=====================================================================
No caso o código acima foi inserido no campo "Quando a tag BODY é aberta" additionalhtmltopofbody