This commit is contained in:
Hell13Cat
2022-04-13 23:24:25 +03:00
parent a4f1506f6d
commit c2a92b5f93
14 changed files with 482 additions and 294 deletions
+18 -4
View File
@@ -3,8 +3,18 @@
<head>
<title>Страница главы</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/manga.css">
<script type="text/javascript" src="js/manga.js"></script>
<link rel="stylesheet" href="css/ch.css">
<link rel="stylesheet" href="css/color-dark.css">
<script type="text/javascript" src="js/ch.js"></script>
<script type="text/javascript" src="js/theming.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-WBB07CK3DY"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-WBB07CK3DY');
</script>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta property="og:title" content="Глава">
@@ -12,6 +22,9 @@
<meta property="og:description" content="Страница главы">
</head>
<body>
<script type="text/javascript">
startstylepage();
</script>
<div class="body-trans">
<div id="maindiv">
<progress class="progress-page" id="progresspage"></progress><br><h id="titlesys"></h>
@@ -31,12 +44,13 @@
<button class="card-button-ch nav-button-fullscreen" onclick="toggleFullScreen()">Экран</button><button class="card-button-ch nav-button-home" onclick="manga_page()">Главы</button>
</div>
<div id="copyright" class="copyright">
<a class="aace" href="mailto:dcma@nyaa.ninja?subject=Manga-DCMA" target="_blank">/DCMA</a> | <a class="aace" href=".">/Главная</a> | <a class="aace" href="https://t.me/Manga_nyaa_ninja" target="_blank">/Telegram</a>
<a class="aace" href="mailto:dcma@nyaa.ninja?subject=Manga Site" target="_blank">/DCMA</a> | <a class="aace" href=".">/Главная</a> | <a class="aace" href="https://t.me/Manga_nyaa_ninja" target="_blank">/Telegram</a><br>
<a class="aace" onclick="swap_theme(1)">Тьма</a> <span class="aace">или</span> <a class="aace" onclick="swap_theme(2)">Свет</a>
</div>
</div>
</div>
</div>
<p id="infostart" class="invis2"></p><p id="infoend" class="invis2"></p><p id="infohead" class="invis2"></p>
<p id="infotitle" class="invis2"></p><p id="infostart" class="invis2"></p><p id="infoend" class="invis2"></p><p id="infohead" class="invis2"></p>
</div>
<script type="text/javascript">
load_page_first();
+60
View File
@@ -0,0 +1,60 @@
.invis {
visibility: hidden;
}
.invis2 {
display: none;
}
.progress-page {
width: 100%;
}
.card-button-ch {
font-family: "Comic Sans MS";
cursor: pointer;
opacity: 1;
}
.card-button-ch:hover {
opacity:0.8;
}
@media only screen and (min-width : 801px) {
.nav-button {
width: 35%;
height: 15%;
}
.nav-button-home {
width: 20%;
height: 15%;
}
.nav-button-fullscreen {
width: 10%;
height: 15%;
}
.card-button-ch {
padding-left: 0px;
padding-right: 0px;
padding-top: 15px;
padding-bottom: 15px;
}
}
@media only screen and (max-width : 800px) {
.nav-button {
width: 50%;
height: 30%;
}
.nav-button-home {
width: 50%;
height: 30%;
}
.nav-button-fullscreen {
width: 50%;
height: 30%;
}
.card-button-ch {
padding-left: 0px;
padding-right: 0px;
padding-top: 20px;
padding-bottom: 20px;
}
}
-29
View File
@@ -1,29 +0,0 @@
.progress-page {
width: 100%;
}
.cover {
width: 25%;
}
.invis {
display: none;
}
.card {
transition: 0.3s;
padding-left: 2px;
padding-top: 2px rgb(255, 255, 255, 1);
padding-bottom: 2px;
padding-right: 2px;
border: 2px solid white;
font-family: "Anime Ace v05";
font-size: 70%;
}
.cardch {
transition: 0.3s;
padding-left: 2px;
padding-top: 2px rgb(255, 255, 255, 1);
padding-bottom: 2px;
padding-right: 2px;
border: 2px solid white;
font-family: "Anime Ace v05";
font-size: 70%;
}
+86
View File
@@ -0,0 +1,86 @@
#hrinvis {
color: #000000;
}
.card {
padding-top: 2px rgb(255, 255, 255, 1);
border: 2px solid white;
}
.cardch {
padding-top: 2px rgb(255, 255, 255, 1);
border: 2px solid white;
}
.carda {
padding-top: 2px rgb(255, 255, 255, 1);
border: 1px solid white;
}
.card-button-ch {
background-color: rgba(0, 0, 0, 0.5);
border: 1px solid rgb(255, 255, 255);
color: #ffffff;
}
body {
color: white;
background: #000000;
}
.body-trans {
background: rgb(0, 0, 0, 0.6);
}
summary {
color: deeppink;
}
.hr-v {
color: #ffffff;
}
.hr-i {
color: rgb(255, 255, 255, 0);
height: 1px;
}
a {
color: deeppink;
}
a:visited {
color: purple;
}
a:active {
color: pink;
}
#card {
box-shadow: 4px 4px 4px 0 rgb(255, 255, 255, 1);
}
#card2 {
border: 1px solid #ffffff;
}
.card-button {
background-color: rgba(0, 0, 0, 0.5);
border: 1px solid rgb(255, 255, 255);
color: #ffffff;
}
#maindiv {
background-color: rgba(0, 0, 0, 0.8);
}
table {
border-bottom: 0px solid rgba(0, 0, 0, 0);
background: rgba(0, 0, 0, 0);
}
th {
background: rgba(0, 0, 0, 0);
color: rgba(0, 0, 0, 0);
}
+82
View File
@@ -0,0 +1,82 @@
.card {
padding-top: 2px rgb(0, 0, 0, 1);
border: 2px solid black;
}
.cardch {
padding-top: 2px rgb(0, 0, 0, 1);
border: 2px solid black;
}
.carda {
padding-top: 2px rgb(0, 0, 0, 1);
border: 1px solid black;
}
.card-button-ch {
background-color: rgba(255, 255, 255, 0.5);
border: 1px solid rgb(0, 0, 0);
color: #000000;
}
body {
color: black;
background: white;
}
.body-trans {
background: rgb(255, 255, 255, 0.6);
}
summary {
color: darkred;
}
.hr-v {
color: black;
}
.hr-i {
color: rgb(0, 0, 0, 0);
height: 1px;
}
a {
color: darkred;
}
a:visited {
color: purple;
}
a:active {
color: darkblue;
}
#card {
box-shadow: 4px 4px 4px 0 rgb(0, 0, 0, 1);
}
#card2 {
border: 1px solid black;
}
.card-button {
background-color: rgba(255, 255, 255, 0.5);
border: 1px solid rgb(0, 0, 0);
color: black;
}
#maindiv {
background-color: rgba(255, 255, 255, 0.8);
}
table {
border-bottom: 0px solid rgba(255, 255, 255, 0);
background: rgba(255, 255, 255, 0);
}
th {
background: rgba(255, 255, 255, 0);
color: rgba(255, 255, 255, 0);
}
+3 -12
View File
@@ -11,30 +11,21 @@
.card {
transition: 0.3s;
padding-left: 2px;
padding-top: 2px rgb(255, 255, 255, 1);
padding-bottom: 2px;
padding-right: 2px;
border: 2px solid white;
font-family: "Anime Ace v05";
font-size: 70%;
font-family: "Comic Sans MS";
}
.carda {
transition: 0.3s;
padding-left: 2px;
padding-top: 2px rgb(255, 255, 255, 1);
padding-bottom: 2px;
padding-right: 2px;
border: 1px solid white;
font-family: "Anime Ace v05";
font-size: 100%;
font-family: "Comic Sans MS";
}
.cardch {
transition: 0.3s;
padding-left: 2px;
padding-top: 2px rgb(255, 255, 255, 1);
padding-bottom: 2px;
padding-right: 2px;
border: 2px solid white;
font-family: "Anime Ace v05";
font-size: 70%;
font-family: "Comic Sans MS";
}
+16 -57
View File
@@ -1,64 +1,23 @@
.invis {
visibility: hidden;
}
.invis2 {
display: none;
}
.progress-page {
width: 100%;
}
.card-button-ch {
background-color: rgba(0, 0, 0, 0.5);
border: 1px solid rgb(255, 255, 255);
color: #ffffff;
font-family: "Anime Ace v05";
font-size: 70%;
cursor: pointer;
opacity: 1;
.cover {
width: 25%;
}
.card-button-ch:hover {
opacity:0.8;
.invis {
display: none;
}
@media only screen and (min-width : 801px) {
.nav-button {
width: 35%;
height: 15%;
}
.nav-button-home {
width: 20%;
height: 15%;
}
.nav-button-fullscreen {
width: 10%;
height: 15%;
}
.card-button-ch {
padding-left: 0px;
padding-right: 0px;
padding-top: 15px;
padding-bottom: 15px;
}
}
@media only screen and (max-width : 800px) {
.nav-button {
width: 50%;
height: 30%;
}
.nav-button-home {
width: 50%;
height: 30%;
}
.nav-button-fullscreen {
width: 50%;
height: 30%;
}
.card-button-ch {
padding-left: 0px;
padding-right: 0px;
padding-top: 20px;
padding-bottom: 20px;
.card {
transition: 0.3s;
padding-left: 2px;
padding-bottom: 2px;
padding-right: 2px;
font-family: "Comic Sans MS";
}
.cardch {
transition: 0.3s;
padding-left: 2px;
padding-bottom: 2px;
padding-right: 2px;
font-family: "Comic Sans MS";
}
+10 -50
View File
@@ -1,18 +1,14 @@
@font-face {
font-family: "Anime Ace v05";
src: local("Anime Ace v05"), url("/fonts/AnimeAce.ttf") format("ttf");
}
body {
text-align: center;
color: white;
margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
background: #000000;
}
#hrinvis {
size: 3px;
}
.body-index {
/* NULL */
@@ -26,20 +22,7 @@ body {
/* NULL */
}
.body-trans {
background: rgb(0, 0, 0, 0.6);
}
summary {
color: deeppink;
}
.hr-v {
color: #ffffff;
}
.hr-i {
color: rgb(255, 255, 255, 0);
height: 1px;
}
@@ -51,16 +34,6 @@ ul {
list-style-position: inside;
}
a {
color: deeppink;
}
a:visited {
color: purple;
}
a:active {
color: pink;
}
#lista {
text-align: left;
}
@@ -72,7 +45,7 @@ a:active {
}
.titlediv {
font-family: "Anime Ace v05";
font-family: "Comic Sans MS";
}
.contentdiv {
@@ -80,36 +53,26 @@ a:active {
}
#card {
box-shadow: 4px 4px 4px 0 rgb(255, 255, 255, 1);
transition: 0.3s;
padding-left: 2px;
padding-top: 2px;
padding-bottom: 2px;
padding-right: 2px;
}
#card2 {
border: 1px solid #ffffff;
}
.card-title {
padding: 1px 0px 1px 10px;
font-family: "Anime Ace v05";
font-size: 90%;
font-family: "Comic Sans MS";
}
.card-text {
padding: 1px 0px 1px 5px;
font-family: "Anime Ace v05";
font-size: 70%;
font-family: "Comic Sans MS";
}
.card-button {
background-color: rgba(0, 0, 0, 0.5);
border: 1px solid rgb(255, 255, 255);
padding: 5px;
color: #ffffff;
font-family: "Anime Ace v05";
font-size: 70%;
font-family: "Comic Sans MS";
cursor: pointer;
opacity: 1;
}
@@ -128,25 +91,22 @@ a:active {
}
.aace {
font-family: "Anime Ace v05";
font-family: "Comic Sans MS";
}
#maindiv {
background-color: rgba(0, 0, 0, 0.8);
margin-top: 0px;
}
table {
border-bottom: 0px solid rgba(0, 0, 0, 0);
background: rgba(0, 0, 0, 0);
margin: 0 auto 0 auto;
}
th {
background: rgba(0, 0, 0, 0);
color: rgba(0, 0, 0, 0);
text-align: center;
}
td, th {
padding: 2px;
}
+14 -1
View File
@@ -5,6 +5,15 @@
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/index.css">
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript" src="js/theming.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-WBB07CK3DY"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-WBB07CK3DY');
</script>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta property="og:title" content="Главная">
@@ -16,6 +25,9 @@
-->
</head>
<body>
<script type="text/javascript">
startstylepage();
</script>
<div class="body-trans">
<div id="maindiv">
<progress class="progress-page" id="progresspage"></progress><br><h id="titlesys"></h>
@@ -27,7 +39,8 @@
<p id="helper1" class="invis"></p>
</div>
<div class="copyright">
<a class="aace" href="mailto:dcma@nyaa.ninja?subject=Manga-DCMA" target="_blank">/DCMA</a> | <a class="aace" href="https://t.me/Manga_nyaa_ninja" target="_blank">/Telegram</a>
<a class="aace" href="mailto:dcma@nyaa.ninja?subject=Manga-DCMA" target="_blank">/DCMA</a> | <a class="aace" href="https://t.me/Manga_nyaa_ninja" target="_blank">/Telegram</a> | <a class="aace" href="https://github.com/Hell13Cat/static-manga-engine" target="_blank">/GitHub</a><br>
<a class="aace" onclick="swap_theme(1)">Тьма</a> <span class="aace">или</span> <a class="aace" onclick="swap_theme(2)">Свет</a>
</div>
</div>
</div>
+116
View File
@@ -0,0 +1,116 @@
function load_page_first() {
document.getElementById('bodydiv').style.visibility = "hidden";
var id_chapt = window.location.hash.replace("#", "");
var requestURL = "img/" + id_chapt + "/info.json";
var request = new XMLHttpRequest();
request.open('GET', requestURL);
request.responseType = 'json';
request.send();
request.onload = function(){
if (request.status != 200) {
document.getElementById('titlesys').textContent = "Ошибка " + request.status + ":" + request.statusText;
document.getElementById('progresspage').style.visibility = "hidden";
} else {
width_page = document.documentElement.scrollWidth;
if(width_page <= 800){
document.getElementById('pc_elem').remove()
} else {
document.getElementById('mobile_elem').remove()
}
var json_ready = request.response;
document.getElementById('prevbutton').style.visibility = "hidden";
document.getElementById('namech').textContent = json_ready["name_ch"];
document.title = json_ready["name_ch"];
document.getElementById('infotitle').textContent = json_ready["name_ch"];
document.getElementById('infostart').textContent = json_ready["start"];
document.getElementById('infoend').textContent = json_ready["end"];
document.getElementById('infohead').textContent = json_ready["head"];
crs_start = "img/" + id_chapt + "/" + json_ready["start"] + "." + json_ready["ext"];
document.getElementById('mangapage').src = crs_start;
document.getElementById('progresspage').style.visibility = "hidden";
var manga_page = document.getElementById('mangapage');
document.getElementById('bodydiv').style.visibility = "visible";
manga_page.onload = function(){
document.getElementById('progressimage').style.visibility = "hidden";
document.getElementById('progressimage2').style.visibility = "hidden";
};
}
}
request.onerror = function() {
document.getElementById('titlesys').textContent = "Ошибка запроса!";
};
}
function toggleFullScreen() {
if (!document.fullscreenElement) {
document.getElementById('namech').remove();
document.getElementById('copyright').style.visibility = "collapse";
document.documentElement.requestFullscreen();
} else {
if (document.exitFullscreen) {
let title_tag = document.createElement('h2');
title_tag.id = "namech";
title_tag.textContent = document.getElementById('infotitle').textContent;
document.getElementById('title_ch').append(title_tag);
document.getElementById('copyright').style.visibility = "visible";
document.exitFullscreen();
}
}
}
function manga_page(count) {
var head_info = document.getElementById('infohead').textContent;
document.location.href = "manga.html#" + head_info;
}
function page_flip(count) {
document.getElementById('progressimage').style.visibility = "visible";
document.getElementById('progressimage2').style.visibility = "visible";
window.scrollTo(0, 0);
var min = parseInt(document.getElementById('infostart').textContent);
var max = parseInt(document.getElementById('infoend').textContent);
var root = "img/";
var current_link = document.getElementById('mangapage').src;
let ref_cute1 = current_link.split('/').reverse();
let ref_cute2 = ref_cute1[0].split('.');
current_num = parseInt(ref_cute2[0]);
if(current_num + count <= max){
if(current_num + count >= min){
var next_num = current_num + count;
var next_link = root + ref_cute1[1] + "/" + next_num + "." + ref_cute2[1];
document.getElementById('mangapage').src = next_link;
if(next_num == min) {
document.getElementById('prevbutton').style.visibility = "hidden";
} else if (next_num == max) {
document.getElementById('nextbutton').style.visibility = "hidden";
} else {
document.getElementById('prevbutton').style.visibility = "visible";
document.getElementById('nextbutton').style.visibility = "visible";
}
} else {
document.getElementById('progressimage').style.visibility = "hidden";
document.getElementById('progressimage2').style.visibility = "hidden";
}
} else {
document.getElementById('progressimage').style.visibility = "hidden";
document.getElementById('progressimage2').style.visibility = "hidden";
}
var manga_page = document.getElementById('mangapage');
manga_page.onload = function (){
document.getElementById('progressimage').style.visibility = "hidden";
document.getElementById('progressimage2').style.visibility = "hidden";
};
}
document.onkeydown = function(e) {
if (e.key == "ArrowLeft"){
page_flip(-1)
} else if (e.key == "ArrowRight") {
page_flip(1)
} else {
// Ignore
}
}
-38
View File
@@ -1,38 +0,0 @@
function start() {
document.getElementById("cardinfo").style.visibility = "hidden";
var id_chapt = window.location.hash.replace("#", "");
var requestURL = "json/" + id_chapt + ".json";
var request = new XMLHttpRequest();
request.open('GET', requestURL);
request.responseType = 'json';
request.send();
request.onload = function() {
if (request.status != 200) {
document.getElementById('title').textContent = "Ошибка " + request.status + ":" + request.statusText;
document.getElementById('progress').style.visibility = "hidden";
} else {
var json_ready = request.response;
document.getElementById("cardinfo").style.visibility = "visible";
document.getElementById('title').textContent = json_ready["name"];
document.title = json_ready["name"];
document.getElementById('cover').src = json_ready["cover"];
document.getElementById('cardinfo1').textContent = "Автор: " + json_ready["author"];
document.getElementById('cardinfo2').textContent = "Статус тайтла: " + json_ready["status_ti"];
document.getElementById('cardinfo3').textContent = "Статус перевода: " + json_ready["status_tl"];
var list_ch = json_ready["ch"];
var index;
for (index = 0; index < list_ch.length; ++index) {
let ch_p_one = document.createElement('p');
let ch_one = document.createElement('a');
ch_one.href = "ch.html#" + list_ch[index]["id"];
ch_one.textContent = list_ch[index]["name"]
ch_p_one.append(ch_one);
document.getElementById('helper1').before(ch_p_one);
}
document.getElementById('progress').style.visibility = "hidden";
}
}
request.onerror = function() {
document.getElementById('title').textContent = "Ошибка запроса!";
};
}
+24 -98
View File
@@ -1,112 +1,38 @@
function load_page_first() {
document.getElementById('bodydiv').style.visibility = "hidden";
function start() {
document.getElementById("cardinfo").style.visibility = "hidden";
var id_chapt = window.location.hash.replace("#", "");
var requestURL = "img/" + id_chapt + "/info.json";
var requestURL = "json/" + id_chapt + ".json";
var request = new XMLHttpRequest();
request.open('GET', requestURL);
request.responseType = 'json';
request.send();
request.onload = function() {
if (request.status != 200) {
document.getElementById('titlesys').textContent = "Ошибка " + request.status + ":" + request.statusText;
document.getElementById('progresspage').style.visibility = "hidden";
document.getElementById('title').textContent = "Ошибка " + request.status + ":" + request.statusText;
document.getElementById('progress').style.visibility = "hidden";
} else {
width_page = document.documentElement.scrollWidth;
if(width_page <= 800){
document.getElementById('pc_elem').remove()
} else {
document.getElementById('mobile_elem').remove()
}
var json_ready = request.response;
document.getElementById('prevbutton').style.visibility = "hidden";
document.getElementById('namech').textContent = json_ready["name_ch"];
document.title = json_ready["name_ch"];
document.getElementById('infostart').textContent = json_ready["start"];
document.getElementById('infoend').textContent = json_ready["end"];
document.getElementById('infohead').textContent = json_ready["head"];
crs_start = "img/" + id_chapt + "/" + json_ready["start"] + "." + json_ready["ext"];
document.getElementById('mangapage').src = crs_start;
document.getElementById('progresspage').style.visibility = "hidden";
var manga_page = document.getElementById('mangapage');
document.getElementById('bodydiv').style.visibility = "visible";
manga_page.onload = function(){
document.getElementById('progressimage').style.visibility = "hidden";
document.getElementById('progressimage2').style.visibility = "hidden";
};
document.getElementById("cardinfo").style.visibility = "visible";
document.getElementById('title').textContent = json_ready["name"];
document.title = json_ready["name"];
document.getElementById('cover').src = json_ready["cover"];
document.getElementById('cardinfo1').textContent = "Автор: " + json_ready["author"];
document.getElementById('cardinfo2').textContent = "Статус тайтла: " + json_ready["status_ti"];
document.getElementById('cardinfo3').textContent = "Статус перевода: " + json_ready["status_tl"];
var list_ch = json_ready["ch"];
var index;
for (index = 0; index < list_ch.length; ++index) {
let ch_p_one = document.createElement('p');
let ch_one = document.createElement('a');
ch_one.href = "ch.html#" + list_ch[index]["id"];
ch_one.textContent = list_ch[index]["name"]
ch_p_one.append(ch_one);
document.getElementById('helper1').before(ch_p_one);
}
document.getElementById('progress').style.visibility = "hidden";
}
}
request.onerror = function() {
document.getElementById('titlesys').textContent = "Ошибка запроса!";
document.getElementById('title').textContent = "Ошибка запроса!";
};
}
function toggleFullScreen() {
if (!document.fullscreenElement) {
document.getElementById('title_ch').style.visibility = "collapse";
document.getElementById('copyright').style.visibility = "collapse";
document.documentElement.requestFullscreen();
} else {
if (document.exitFullscreen) {
document.getElementById('title_ch').style.visibility = "visible";
document.getElementById('copyright').style.visibility = "visible";
document.exitFullscreen();
}
}
}
function manga_page(count) {
var head_info = document.getElementById('infohead').textContent;
document.location.href = "manga.html#" + head_info;
}
function page_flip(count) {
document.getElementById('progressimage').style.visibility = "visible";
document.getElementById('progressimage2').style.visibility = "visible";
window.scrollTo(0, 0);
var min = parseInt(document.getElementById('infostart').textContent);
var max = parseInt(document.getElementById('infoend').textContent);
var root = "img/";
var current_link = document.getElementById('mangapage').src;
let ref_cute1 = current_link.split('/').reverse();
let ref_cute2 = ref_cute1[0].split('.');
current_num = parseInt(ref_cute2[0]);
if(current_num + count <= max){
if(current_num + count >= min){
var next_num = current_num + count;
var next_link = root + ref_cute1[1] + "/" + next_num + "." + ref_cute2[1];
document.getElementById('mangapage').src = next_link;
if(next_num == min) {
document.getElementById('prevbutton').style.visibility = "hidden";
} else if (next_num == max) {
document.getElementById('nextbutton').style.visibility = "hidden";
} else {
document.getElementById('prevbutton').style.visibility = "visible";
document.getElementById('nextbutton').style.visibility = "visible";
}
} else {
document.getElementById('progressimage').style.visibility = "hidden";
document.getElementById('progressimage2').style.visibility = "hidden";
}
} else {
document.getElementById('progressimage').style.visibility = "hidden";
document.getElementById('progressimage2').style.visibility = "hidden";
}
var manga_page = document.getElementById('mangapage');
manga_page.onload = function (){
document.getElementById('progressimage').style.visibility = "hidden";
document.getElementById('progressimage2').style.visibility = "hidden";
};
}
document.onkeydown = function(e) {
if (e.key == "ArrowLeft"){
page_flip(-1)
} else if (e.key == "ArrowRight") {
page_flip(1)
} else {
// Ignore
}
}
+34
View File
@@ -0,0 +1,34 @@
function addstylesheet(name_short) {
var head = document.head;
var link = document.createElement("link");
link.type = "text/css";
link.rel = "stylesheet";
name_style = "css/color-"+name_short+".css"
link.href = name_style;
link.id = "currentstylesheet";
head.appendChild(link);
}
function startstylepage() {
var cookieValue = document.cookie.replace(/(?:(?:^|.*;\s*)theme\s*\=\s*([^;]*).*$)|^.*$/, "$1");
if(cookieValue == "") {
addstylesheet("dark");
} else {
addstylesheet(cookieValue);
}
}
function swap_theme(num) {
if(num == 1) {
document.cookie = "theme=dark; max-age=2592000; secure";
document.getElementById('currentstylesheet').remove();
addstylesheet("dark");
} else if (num == 2) {
document.cookie = "theme=light; max-age=2592000; secure";
document.getElementById('currentstylesheet').remove();
addstylesheet("light");
} else {
// Ignore
}
}
+17 -3
View File
@@ -3,8 +3,18 @@
<head>
<title>Страница манги</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/chapter.css">
<script type="text/javascript" src="js/chapters.js"></script>
<link rel="stylesheet" href="css/manga.css">
<link rel="stylesheet" href="css/color-dark.css">
<script type="text/javascript" src="js/manga.js"></script>
<script type="text/javascript" src="js/theming.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-WBB07CK3DY"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-WBB07CK3DY');
</script>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta property="og:title" content="Манги">
@@ -12,6 +22,9 @@
<meta property="og:description" content="Страница манги">
</head>
<body>
<script type="text/javascript">
startstylepage();
</script>
<div class="body-trans">
<div id="maindiv">
<progress class="progress-page" id="progress"></progress><br>
@@ -30,7 +43,8 @@
<p id="helper1" class="invis"></p>
</div>
<div class="copyright">
<a class="aace" href="mailto:dcma@nyaa.ninja?subject=Manga-DCMA" target="_blank">/DCMA</a> | <a class="aace" href=".">/Главная</a> | <a class="aace" href="https://t.me/Manga_nyaa_ninja" target="_blank">/Telegram</a>
<a class="aace" href="mailto:dcma@nyaa.ninja?subject=Manga-DCMA" target="_blank">/DCMA</a> | <a class="aace" href=".">/Главная</a> | <a class="aace" href="https://t.me/Manga_nyaa_ninja" target="_blank">/Telegram</a><br>
<a class="aace" onclick="swap_theme(1)">Тьма</a> <span class="aace">или</span> <a class="aace" onclick="swap_theme(2)">Свет</a>
</div>
</div>
</div>