top of page
Buscar

Agente motivacional



<!DOCTYPE html>

<html lang="es">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Agente Motivacional</title>

<style>

body {

font-family: Arial, sans-serif;

text-align: center;

margin: 20px;

background: linear-gradient(to right, #fceabb, #f8b500);

color: #333;

}


h1 {

color: #fff;

text-shadow: 1px 1px 3px #000;

}


button {

padding: 12px 24px;

font-size: 16px;

cursor: pointer;

background-color: #4caf50;

color: white;

border: none;

border-radius: 8px;

margin-top: 20px;

}


button:hover {

background-color: #45a049;

}


margin-top: 20px;

font-weight: bold;

}


margin-top: 20px;

border: 2px solid #fff;

background-color: rgba(255, 255, 255, 0.9);

padding: 15px;

min-height: 100px;

border-radius: 10px;

box-shadow: 0px 0px 10px rgba(0,0,0,0.2);

}

</style>

</head>

<body>

<h1>🌟 Agente Motivacional 🌟</h1>

<button onclick="startAgent()">Iniciar Búsqueda</button>

<div id="status"></div>

<div id="output"></div>

<div id="history"></div>


<script>

let intervalSearch, intervalWrite, timeoutStop;

const keywords = ["educación", "biblia", "salud", "deporte", "leer", "aprender", "estudiar"];

let history = [];


function startAgent() {

document.getElementById("output").innerHTML = "";

document.getElementById("history").innerHTML = "Historial:";

history = [];


intervalSearch = setInterval(() => {

let keyword = keywords[Math.floor(Math.random() * keywords.length)];

document.getElementById("status").innerText = "🔍 Buscando en Google: " + keyword;

window.open(`https://www.google.com/search?q=${keyword}`, '_blank');

}, 10000);


intervalWrite = setInterval(() => {

let poem = generatePoem();

document.getElementById("output").innerText = poem;

history.push(poem);

document.getElementById("history").innerHTML = "Historial:<br>" + history.join("<br><br>");

}, 5000);


timeoutStop = setTimeout(() => {

clearInterval(intervalSearch);

clearInterval(intervalWrite);

document.getElementById("status").innerText = "✅ Proceso finalizado.";

}, 60000);

}


function generatePoem() {

const lines = [

"✨ Levántate con energía y pasión,",

"📚 El conocimiento es la clave del sol,",

"🏃‍♂️ Corre, salta, siente el aire,",

"📖 Cada página leída es un mundo por explorar.",

"💪 El esfuerzo de hoy es la victoria de mañana.",

"🧠 Aprende algo nuevo cada día.",

"❤️ Cuida tu cuerpo, mente y espíritu.",

"🎯 Persigue tus sueños con determinación.",

];

return lines[Math.floor(Math.random() * lines.length)];

}

</script>

</body>

</html>


ree

 
 
 

Comentarios


bottom of page