Обновил айди статусов

This commit is contained in:
2021-01-17 02:01:03 +03:00
parent cf4d73f6ab
commit 12858d8d87
4 changed files with 27 additions and 17 deletions

View File

@@ -9,13 +9,15 @@
<link href="style.css" rel="stylesheet"> <link href="style.css" rel="stylesheet">
</head> </head>
<body> <body>
<a class="big" href="http://status.anatolykopyl.ru:5001/update">Обновить Толин эмодзи статус!</a> <div class="main">
<div class="links-container"> <a class="big" onclick="send()">Обновить Толин эмодзи статус!</a>
<p>Другие мои сайты:</p> <div class="links-container">
<div class="links"> <p>Другие мои сайты:</p>
<a href="https://anatolykopyl.ru">Обо мне</a> <div class="links">
<a href="https://atolchek.anatolykopyl.ru">Булочная</a> <a href="https://anatolykopyl.ru">Обо мне</a>
<a href="https://groupanal.ru">Анализ Групп</a> <a href="https://atolchek.anatolykopyl.ru">Булочная</a>
<a href="https://groupanal.ru">Анализ Групп</a>
</div>
</div> </div>
</div> </div>

View File

@@ -1,6 +1,4 @@
function showHint() { function showHint() {
console.log(document.getElementById("hint-div").style.display);
if (document.getElementById("hint-div").style.display == "block") { if (document.getElementById("hint-div").style.display == "block") {
document.getElementById("hint-div").style.display = "none"; document.getElementById("hint-div").style.display = "none";
document.getElementById("hint-link").innerHTML = "Что это?"; document.getElementById("hint-link").innerHTML = "Что это?";
@@ -11,3 +9,10 @@ function showHint() {
document.getElementById("hint-link").style.color = "black"; 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();
}

View File

@@ -10,16 +10,18 @@ dotenv.config();
const app = Express(); const app = Express();
const port = process.env.PORT || 5001; 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.use(Cors());
app.get('/update', (req, res) => { app.get('/update', (req, res) => {
var id = statusIds[Math.floor(Math.random() * statusIds.length)]; 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) => { httpsReq(url).then((response) => {
console.log(response); console.log(response);
res.redirect("https://status.anatolykopyl.ru"); //res.redirect("https://status.anatolykopyl.ru");
res.send();
}); });
}); });

View File

@@ -1,13 +1,13 @@
* { * {
font-family: 'Open Sans', sans-serif; font-family: 'Open Sans', sans-serif;
} }
html { html, body {
height: 100%;
}
body {
height: 100%; height: 100%;
margin: 0px; margin: 0px;
}
.main {
height: 100%;
text-align: center; text-align: center;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -75,6 +75,7 @@ div.links a:hover {
font-size: small; font-size: small;
text-decoration: underline; text-decoration: underline;
z-index: 10; z-index: 10;
cursor: pointer;
} }
#hint-div { #hint-div {