mirror of
https://github.com/anatolykopyl/status.git
synced 2026-03-26 12:54:46 +00:00
Обновил айди статусов
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
<link href="style.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<a class="big" href="http://status.anatolykopyl.ru:5001/update">Обновить Толин эмодзи статус!</a>
|
||||
<div class="main">
|
||||
<a class="big" onclick="send()">Обновить Толин эмодзи статус!</a>
|
||||
<div class="links-container">
|
||||
<p>Другие мои сайты:</p>
|
||||
<div class="links">
|
||||
@@ -18,6 +19,7 @@
|
||||
<a href="https://groupanal.ru">Анализ Групп</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a id="hint-link" onclick="showHint()">Что это?</a>
|
||||
<div id="hint-div">
|
||||
|
||||
9
main.js
9
main.js
@@ -1,6 +1,4 @@
|
||||
function showHint() {
|
||||
console.log(document.getElementById("hint-div").style.display);
|
||||
|
||||
if (document.getElementById("hint-div").style.display == "block") {
|
||||
document.getElementById("hint-div").style.display = "none";
|
||||
document.getElementById("hint-link").innerHTML = "Что это?";
|
||||
@@ -11,3 +9,10 @@ function showHint() {
|
||||
document.getElementById("hint-link").style.color = "black";
|
||||
}
|
||||
}
|
||||
|
||||
var xhttp = new XMLHttpRequest();
|
||||
|
||||
function send() {
|
||||
xhttp.open("GET", "http://status.anatolykopyl.ru:5001/update", true);
|
||||
xhttp.send();
|
||||
}
|
||||
@@ -10,16 +10,18 @@ dotenv.config();
|
||||
const app = Express();
|
||||
const port = process.env.PORT || 5001;
|
||||
|
||||
const statusIds = [1, 2, 3, 4, 5, 9, 10, 17, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 38, 39];
|
||||
//const statusIds = [1, 2, 3, 4, 5, 9, 10, 17, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 38, 39];
|
||||
const statusIds = [114, 115, 116, 117, 118, 119, 120, 121];
|
||||
|
||||
app.use(Cors());
|
||||
|
||||
app.get('/update', (req, res) => {
|
||||
var id = statusIds[Math.floor(Math.random() * statusIds.length)];
|
||||
let url = `https://api.vk.com/method/users.setCovidStatus?access_token=${process.env.TOKEN}&status_id=${id}&v=5.103`;
|
||||
let url = `https://api.vk.com/method/status.setImage?access_token=${process.env.TOKEN}&status_id=${id}&v=5.103`;
|
||||
httpsReq(url).then((response) => {
|
||||
console.log(response);
|
||||
res.redirect("https://status.anatolykopyl.ru");
|
||||
//res.redirect("https://status.anatolykopyl.ru");
|
||||
res.send();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
11
style.css
11
style.css
@@ -1,13 +1,13 @@
|
||||
* {
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.main {
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -75,6 +75,7 @@ div.links a:hover {
|
||||
font-size: small;
|
||||
text-decoration: underline;
|
||||
z-index: 10;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#hint-div {
|
||||
|
||||
Reference in New Issue
Block a user