forked from maelgruand1/JS-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
55 lines (46 loc) · 1.53 KB
/
index.html
File metadata and controls
55 lines (46 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#1e2a3a">
<title>JS Editor</title>
<!-- Lien vers le manifest.json -->
<link rel="manifest" href="manifest.json">
<!-- Ajouter une icône pour le favicon -->
<link rel="icon" href="icons/th.jpeg" type="image/jpeg">
<!-- Meta tags pour améliorer l'expérience sur mobile -->
<meta name="description" content="Un éditeur JavaScript dans votre navigateur">
<meta name="author" content="Maël Gruand">
<!-- Ajout d'un CSS -->
<link rel="stylesheet" href="style.css">
<!-- Script pour charger Monaco Editor -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.52.2/min/vs/loader.js"></script>
</head>
<body>
<div class="header">
JS Editor
</div>
<br><br><br>
<div id="container"></div>
<button id="runButton">Exécuter le code</button>
<div class="output-section">
<h3>Résultat :</h3>
<pre id="output"></pre>
</div>
<div class="footer">
© 2025 Maël Gruand
</div>
<!-- Script principal de l'application -->
<script src="main.js"></script>
<script>
if ("serviceWorker" in navigator) {
window.addEventListener("load", () => {
navigator.serviceWorker.register("service-worker.js")
.then(() => console.log("Service Worker enregistré !"))
.catch((err) => console.log("Échec de l'enregistrement du Service Worker :", err));
});
}
</script>
</body>
</html>