35 lines
919 B
HTML
35 lines
919 B
HTML
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Status des messages WhatsApp</title>
|
|
<style>
|
|
body { font-family: sans-serif; padding: 20px; background: #f5f5f5; }
|
|
h1 { color: #333; }
|
|
.message {
|
|
background: white;
|
|
padding: 10px;
|
|
margin-bottom: 10px;
|
|
border-left: 4px solid #4CAF50;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>📊 Suivi des messages WhatsApp</h1>
|
|
<div id="log"></div>
|
|
|
|
<script>
|
|
const logContainer = document.getElementById('log');
|
|
const ws = new WebSocket('ws://' + location.host);
|
|
|
|
ws.onmessage = (event) => {
|
|
const data = JSON.parse(event.data);
|
|
const div = document.createElement('div');
|
|
div.className = 'message';
|
|
div.innerHTML = `<strong>${data.status}</strong> pour <code>${data.jid}</code><br>ID: <code>${data.messageId}</code>`;
|
|
logContainer.prepend(div);
|
|
};
|
|
</script>
|
|
</body>
|
|
</html>
|