Browse Source

link to file drop and history scroll

RenonDis 8 months ago
parent
commit
d852098c86
2 changed files with 11 additions and 3 deletions
  1. 7 1
      history.php
  2. 4 2
      index.php

+ 7 - 1
history.php

@@ -89,4 +89,10 @@ foreach (glob('./history/*') as $f) {
89 89
 ?>
90 90
     
91 91
     </body>
92
-</html>
92
+	<script type="text/javascript" src="jquery.min.js"></script>
93
+	<script>
94
+	$(document).ready(function() {
95
+	 	$("html").scrollTop($("html")[0].scrollHeight);
96
+	});
97
+	</script>
98
+</html>

+ 4 - 2
index.php

@@ -52,6 +52,7 @@ if (isset($_POST['enter'])) {
52 52
     <head>
53 53
 	<title>Chat FAME</title>
54 54
 	<meta charset="UTF-8" />
55
+	<meta name="viewport" content="width=device-width, initial-scale=1.0">
55 56
 	<link type="text/css" rel="stylesheet" href="style.css" />
56 57
     </head>
57 58
 
@@ -66,6 +67,7 @@ if (!isset($_SESSION['name'])) {
66 67
 		<p class="welcome">Ceci est le chat de la FAME. Bienvenue à toi <b><?php echo $_SESSION['name']; ?></b> !</p>
67 68
 		<p class="logout"><a id="exit" href="#">Quitter</a></p>
68 69
 		<p class="logout" style="margin-right: 1em;"><a target="_blank" href="history.php">Historique</a></p>
70
+		<p class="logout" style="margin-right: 2em;"><a target="_blank" href="https://cloud.nry.pw/index.php/s/5E2Y2wfi3QRpFKd">Fichiers</a></p>
69 71
 		<div style="clear:both"></div>
70 72
 	    </div>	
71 73
 	    <div id="datbox">
@@ -78,7 +80,7 @@ if (!isset($_SESSION['name'])) {
78 80
 		<input name="submitmsg" type="submit"  id="submitmsg" value="Envoyer" />
79 81
 	    </form>
80 82
 
81
-	    <br><input id="mute" name="mode muet" type="checkbox"/> mode muet
83
+	    <br><input id="mute" name="mode muet" type="checkbox"/> mode muet (sans le "diiing" des nouveaux messages quoi)
82 84
 	</div>
83 85
 	<script type="text/javascript" src="jquery.min.js"></script>
84 86
 	<script type="text/javascript">
@@ -180,7 +182,7 @@ if (!isset($_SESSION['name'])) {
180 182
 						}    
181 183
 						document.title = "(1) Chat FAME";
182 184
 						if (!$("#mute").prop('checked')) {
183
-							audio.play();
185
+							if (!document.hasFocus()) audio.play();
184 186
 						}
185 187
 					}
186 188
 					isRunLoadLog = false;