-
Notifications
You must be signed in to change notification settings - Fork 0
/
tele.html
55 lines (51 loc) · 1.46 KB
/
tele.html
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
<html style="background-color: black;">
<head>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
</head>
<style>
.mirror {
display: block;
-moz-transform: matrix(-1, 0, 0, 1, 0, 0);
-webkit-transform: matrix(-1, 0, 0, 1, 0, 0);
-o-transform: matrix(-1, 0, 0, 1, 0, 0);
font-size: 100px;
color: white;
}
body {
overflow: hidden;
}
</style>
<body>
<marquee behavior="scroll" direction="up" scrollamout="10" class="mirror" id="text"></marquee>
</body>
</html>
<script src="javas/socket.io.js"></script>
<script src="javas/jquery-3.5.1.js"></script>
<script>
var socket = io.connect('http://192.168.20.103:8000/');
socket.on('text', function(text){
$('#text').text(text);
window.scrollTo(0,document.body.scrollHeight);
});
socket.on('start', function(){
document.getElementById('text').start();
});
socket.on('stop', function() {
document.getElementById('text').stop();
});
var defaltspeed = 10;
function changespeed(speed){
var texto = document.getElementById('text');
texto.setAttribute("scrollamount", defaltspeed);
console.log(defaltspeed);
}
socket.on('mais', function() {
defaltspeed++;
changespeed(defaltspeed);
});
socket.on('menos', function() {
defaltspeed--;
changespeed(defaltspeed);
});
</script>