How to change the tab title? Respecting internally the determining title that I want

-4
<html lang="pt-br">
<head>
    <meta charset="UTF-8">
    <title>- W3bs1t3 bY Yuckrypt3r -</title>
</head>
<script>
function titleChange() {
    var element = document.getElementById('element');
    element.innerHTML = '<title>- Made bY Yuckrypt3r -</title>'
}
var elemento = document.querySelector('body');
elemento.addEventListener('mouseover', titleChange);
</script>
<body>

</body>
</html>
    
asked by anonymous 14.12.2018 / 16:47

1 answer

0

You can use this function to change the title of the page infinitely, you will only need to create an array for the names you want and assign the variable.

function alterarTitulo(initiate) {
    if (initiate !== true) {
        window.parent.document.title = /*Titulo que você quer*/
    }
    setTimeout(alterarTitulo, 5000);
}

$(function() {
    alterarTitulo(true);
});

If you call alterarTitulo(true); with true , it does not execute directly the change of title, but will run every 5 seconds.

    
14.12.2018 / 17:48