This commit is contained in:
root
2022-10-13 07:07:04 +03:00
parent 30fd8f0ec3
commit 6d6712e9d2
21 changed files with 590 additions and 98 deletions

View File

@@ -0,0 +1,24 @@
'use strict';
function rotate(id, page, reload = false) {
if (typeof id === 'number' && typeof page === 'number') {
// Получены входные параметры
// Запрос
fetch(`https://surikovlib.ru/books/${id}/${page}/rotate`, {
method: 'POST'
}).then(
(value) => {
return value.json();
}
).then(
(response) => {
if (response.status === true) {
// Перевёрнута страница
if (reload === true) location.reload();
}
}
);
}
}