92
| <![CDATA[<script>
var tam = 15;
function mudaFonte(tipo, elemento) {
if (tipo == "mais") {
if (tam < 24)
tam += 1;
} else {
if (tam > 10)
tam -= 1;
}
document.getElementById("Noticia").style.fontSize = tam + "px";
document.getElementById("Descricao").style.fontSize = tam + "px";
}
function printDiv(id, pg, url) {
var oPrint, oJan;
oPrint = window.document.getElementById(id).innerHTML;
oJan = window.open(pg);
oJan.document.write(oPrint);
oJan.document.write(url);
oJan.window.print();
oJan.document.close();
oJan.focus();
}
// Função contraste INICIO
(function() {
var Contrast = {
storage: 'contrastState',
cssClass: 'contrast',
currentState: null,
check: checkContrast,
getState: getContrastState,
setState: setContrastState,
toogle: toogleContrast,
updateView: updateViewContrast
};
window.toggleContrast = function() {
Contrast.toogle();
};
Contrast.check();
function checkContrast() {
this.updateView();
}
function getContrastState() {
return localStorage.getItem(this.storage) === 'true';
}
function setContrastState(state) {
localStorage.setItem(this.storage, '' + state);
this.currentState = state;
this.updateView();
}
function updateViewContrast() {
var body = document.body;
if (this.currentState === null)
this.currentState = this.getState();
if (this.currentState)
body.classList.add(this.cssClass);
else
body.classList.remove(this.cssClass);
}
function toogleContrast() {
this.setState(!this.currentState);
}
})();
// Função contraste FIM
</script>]]>
|
223
| <![CDATA[<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'pt',
autoDisplay: false,
includedLanguages: 'de,es,fr,en,it',
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
},
'google_translate_element');
}
</script>]]>
|
432
| <![CDATA[<script>
$(document).ready(function() {
$(window).scroll(function() {
if ($(this).scrollTop() > 100) {
$("#logo-top-bar").css({
"margin-top": "-25.5Vh",
"transition": ".4s",
"z-index": "-2"
});
$("#logo-top-bar").fadeOut("800");
$('#scroll').fadeIn();
} else {
$("#logo-top-bar").fadeIn("800");
$("#logo-top-bar").css({
"margin-top": "0px"
});
$('#scroll').fadeOut();
}
});
$('#scroll').click(function() {
$("html, body").animate({
scrollTop: 0
}, 0);
return false;
});
$('#menu-acessiblidade').hide().contents().hide();
$('#btnperq').on('click', function(e) {
e.preventDefault();
$('#menu-acessiblidade').slideToggle('fast', function(e) {
if ($(this).is(':visible')) {
$(this).contents().fadeIn(1000);
} else {
$(this).contents().hide();
}
});
})
});
</script>]]>
|
894
| <![CDATA[<script>
shortcut.add("Alt+H", function() {
window.location.assign("index.php");
});
shortcut.add("Alt+Shift+1", function() {
window.location.assign("acessibilidade.php");
});
shortcut.add("Alt+9", function() {
window.scrollTo(0, 0);
});
shortcut.add("Alt+C", function() {
window.location.href = '#ancora';
});
</script>]]>
|
1255
| <![CDATA[<script>
var cookies2 = document.cookie;
if (cookies2.indexOf("usuarioCookiesPm") == -1) {
document.getElementById('cookie-container').style.display = "flex";
}
function fechaDiv(){
document.cookie = 'usuarioCookiesPm=SIM; max-age=86400;path=/';
$.post("data_cookies.php", { usercookies : "YES" }, function(msg){ })
document.getElementById('cookie-container').style.display = "none";
}
</script>]]>
|
1279
| <![CDATA[<script type="text/javascript" language="javascript">
jQuery(function($) {
$("#dtini").mask("99/99/9999");
$("#whats").mask("(99)99999.9999");
$("#dtfim").mask("99/99/9999");
});
var voto = 0;
$(".formsend").submit(function(e) {
e.preventDefault();
var form = $(this);
var load = $(".ajax_load");
var flashClass = "ajax_response";
var flash = $("." + flashClass);
var btnsubmit = form.find('button[type=submit]');
form.ajaxSubmit({
"url": form.attr("action"),
"type": "POST",
"dataType": "json",
"beforeSend": function() {
btnsubmit.prop('disabled', true);
load.fadeIn(200).css("display", "flex");
},
"success": function(data) {
console.log(data);
btnsubmit.removeAttr('disabled');
Swal.fire({
text: data.msg,
title: data.title,
confirmButtonText: data.btn,
type: data.tipo
}).then(() => {
if (data.retorno != '') {
form.trigger("reset");
if (data.retorno == 'R') {
window.location.reload();
} else {
window.location.href = data.retorno;
}
} else {
return false;
}
});
},
"error": function(error) {
console.log(error);
alert(error);
},
"complete": function() {
load.fadeOut(200);
btnsubmit.removeAttr('disabled');
if (form.data("reset") === true) {
form.trigger("reset");
}
}
});
});
$('.vote label i.fa').on('click mouseover', function() {
// remove classe ativa de todas as estrelas
$('.vote label i.fa').removeClass('active');
// pegar o valor do input da estrela clicada
var val = $(this).prev('input').val();
//percorrer todas as estrelas
$('.vote label i.fa').each(function() {
/* checar de o valor clicado é menor ou igual do input atual
* se sim, adicionar classe active
*/
var $input = $(this).prev('input');
if ($input.val() <= val) {
$(this).addClass('active');
}
});
voto = val; // somente para teste
});
//Ao sair da div vote
$('.vote').mouseleave(function() {
//pegar o valor clicado
var val = $(this).find('input:checked').val();
//se nenhum foi clicado remover classe de todos
if (val == undefined) {
$('.vote label i.fa').removeClass('active');
} else {
//percorrer todas as estrelas
$('.vote label i.fa').each(function() {
/* Testar o input atual do laço com o valor clicado
* se maior, remover classe, senão adicionar classe
*/
var $input = $(this).prev('input');
if ($input.val() > val) {
$(this).removeClass('active');
} else {
$(this).addClass('active');
}
});
}
$("#voto").html(val); // somente para teste
});
</script>]]>
|
1395
| <![CDATA[<script>
$(function() {
/* Custom buttons */
$('#font-setting-buttons').easyView({
container: 'body, .row',
increaseSelector: '.increase-me',
decreaseSelector: '.decrease-me',
normalSelector: '.reset-me',
contrastSelector: '.change-me'
});
});
</script>]]>
|