-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.html
81 lines (73 loc) · 2.29 KB
/
home.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>API Request</title>
<style>
/* Sayfanın tamamını ortalar */
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
font-family: Arial, sans-serif;
background-color: #f4f4f4;
}
/* Butonların bulundugu kapsayıcı */
.button-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 15px;
}
/* Buton stili */
.button {
padding: 15px 30px;
font-size: 18px;
border: none;
border-radius: 8px;
background-color: #4CAF50;
color: white;
cursor: pointer;
width: 100%;
max-width: 300px;
text-align: center;
transition: background-color 0.3s ease;
}
.button:hover {
background-color: #45a049;
}
/* Mobil uyumluluk */
@media (max-width: 600px) {
.button {
font-size: 16px;
padding: 12px 24px;
}
}
</style>
</head>
<body>
<div class="button-container">
<button class="button" onclick="sendData('RECENT')">Recent</button>
<button class="button" onclick="sendData('HOME')">Home</button>
<button class="button" onclick="sendData('BACK')">Back</button>
</div>
<script>
function sendData(command) {
const url = `https://trigger.macrodroid.com/27ac2082-c2e3-45f8-b654-3d0e69ed7da2/enablewebhook?text=${command}`;
fetch(url)
.then(response => response.text())
.then(data => {
console.log('Success:', data);
alert("Command sent: " + command);
})
.catch((error) => {
console.error('Error:', error);
alert("Error sending command: " + command);
});
}
</script>
</body>
</html>