Calculator Tools Calculator Tools
Create

Barra de Progresso da Globo

Jan 3, 2024

About this app

Uma barra de progresso que vai de 1 até 100 e, quando chegar a 100, exibe o site da Globo

Barra de Progresso da Globo Barra de Progresso da Globo

Related apps

Put this on your site

Source

                    <html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>Barra de Progresso da Globo</title>
<meta name="description" content="Uma barra de progresso que vai de 1 até 100 e, quando chegar a 100, exibe o site da Globo">
<meta name="keywords" content="barra de progresso, globo, site">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
document.addEventListener("DOMContentLoaded", function() {
// Get the progress bar element
var progressBar = document.getElementById("progress-bar");
// Set the initial value
var value = 1;
// Set the interval to increment the value every 100 milliseconds
setInterval(function() {
// Increment the value
value++;
// Update the width of the progress bar
progressBar.style.width = value + "%";
// If the value reaches 100, redirect to the Globo website
if (value === 100) {
window.location.href = "https://www.globo.com";
}
}, 100);
});

} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>

<style>
/* App CSS Goes Here */
.progress-bar {
height: 20px;
background-color: #f5f5f5;
border-radius: 4px;
transition: width 0.3s ease-in-out;
}

.progress-bar-inner {
height: 100%;
background-color: #007bff;
border-radius: 4px;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<!-- App HTML Goes Here -->
<h1>Barra de Progresso da Globo</h1>
<div class="progress-bar">
<div id="progress-bar" class="progress-bar-inner"></div>
</div>
</div>
</body>
</html>