This commit is contained in:
Hell13Cat
2022-04-23 21:28:03 +03:00
parent 1738f647ce
commit cd717bfa75
11 changed files with 37 additions and 17 deletions
-1
View File
@@ -1,5 +1,4 @@
function load_page_first() {
document.getElementById('bodydiv').style.visibility = "hidden";
var id_chapt = window.location.hash.replace("#", "");
chapt_ref = id_chapt.split("_");
document.cookie = "idchaptlast="+id_chapt+"; max-age=2592000; secure";
-1
View File
@@ -3,7 +3,6 @@ function getRandomInt(min, max) {
}
function start() {
document.getElementById('bodydiv').style.visibility = "hidden";
var last_ch_id = document.cookie.replace(/(?:(?:^|.*;\s*)idchaptlast\s*\=\s*([^;]*).*$)|^.*$/, "$1");
if(last_ch_id == "") {
document.getElementById('lastchbutton').textContent = "Последней главы нет";
+1 -1
View File
@@ -1,5 +1,4 @@
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();
@@ -30,6 +29,7 @@ function start() {
ch_p_one.append(ch_one);
document.getElementById('helper1').before(ch_p_one);
}
document.getElementById('bodydiv').style.visibility = "visible";
document.getElementById('progress').style.visibility = "hidden";
}
}
+8 -1
View File
@@ -1,9 +1,16 @@
function getRandomInt(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min)) + min;
}
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"
version = 2
name_style = "css/color-"+name_short+".css?v=" + version;
link.href = name_style;
link.id = "currentstylesheet";
head.appendChild(link);