Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tanbatu committed Jun 27, 2023
1 parent b7be815 commit 9ee500a
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 20 deletions.
44 changes: 28 additions & 16 deletions files/setting.html
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@
position: absolute;
}

.scroll {}
.scroll {
margin-top: 20px;
}

.scroll::-webkit-scrollbar {
width: 9px;
Expand Down Expand Up @@ -446,6 +448,7 @@
position: absolute;
">v6.0</p>
</a>

<div style="padding:14px;display: flex;">
<img id="logo" style="width:130px;position: absolute;left: 50%;transform: translate(-50%,0);" src="">
<div style="position:absolute;width:18px;right:20px;top:20px;z-index:1" class="ZenkomeCloseButton">
Expand All @@ -471,23 +474,33 @@ <h3 style="line-height:2em;left:50%;color:rgb(255, 255, 255);font-size:200%;marg
</div>
<div class="beforewave"></div>
<div class="card">

<div
style="height: 50%;margin-top: 20px;pointer-events: none;width: 97%;background: linear-gradient( white, #ffffff00);">
</div>
<div class="wave" id="wave1"></div>
<div class="wave" id="wave2"></div>
</div>

<div class="scroll" style="overflow: auto;height: calc(100% - 171px) ;transition: 0.5s;">
<div class="scroll" style="overflow: auto;height: calc(100% - 201px) ;transition: 0.5s;">


<div style="padding:10px;color:rgb(75, 75, 75)">
<div style="margin-top:20px" class="config_parts">
<div style="width:100%" class="DateTimeInput">
<div>
<h3>始点</h3>
<input id="zenkome-date" class="DateTimeInput-date" type="date" value="">
<input style="margin-left:10px" id="zenkome-time" class="DateTimeInput-time" type="time"
value="23:59">
</div>
</div>
<div style="margin-top:6px;">
<input type="checkbox" id="iseasy" /><label for="iseasy">かんたんコメントを読み込まない</label>
</div>

<div style="margin-top:40px;width:100%" class="DateTimeInput config_parts">

<h3>始点</h3>
<input id="zenkome-date" class="DateTimeInput-date" type="date" value="">
<input style="margin-left:10px" id="zenkome-time" class="DateTimeInput-time" type="time"
value="23:59">
</div>

<div class="config_parts" style="padding-top:10px;">
<div style="display:flex">
<h3>描画設定</h3>
Expand Down Expand Up @@ -519,7 +532,7 @@ <h3>描画設定</h3>
<b>フレームレート</b><small class="range_val" id="val_alpha">30</small><br>
0 <input class="range_bar" id="bar_fps" type="range" name="speed" step="1" value="30"
min="1" max="200">
60
200
</div>
</div>

Expand Down Expand Up @@ -559,19 +572,18 @@ <h3>NGリスト</h3>
</div>
<div style="margin-top:6px;display:flex">
<p>NG共有レベル</p>
<select style="margin-left:5px;border-color:#bbb" id="ng_score" name="example">
<select style="margin-left:5px;border-color:#bbb;width: 51px;" id="ng_score" name="example">
<option value="-Infinity"></option>
<option value="-10000"></option>
<option value="-4800"></option>
<option value="-1000"></option>
<option value="-1">最強</option>
<option value="-1">最強(スコア0未満全て)</option>
</select>

</div>


<div style="margin-top:6px;">
<input type="checkbox" id="iseasy" /><label for="iseasy">かんたんコメントを読み込まない</label>
</div>

</div>
<div class="config_parts" style="padding-top:10px;">

Expand Down Expand Up @@ -614,8 +626,8 @@ <h3>その他</h3>
<input type="checkbox" id="isxml" /><label for="isxml">XMLでダウンロード</label>
</div>
<div style="margin-top:6px;">
<input type="checkbox" id="isauto" /><label for="isauto">自動読み込み(最大5)</label>
<input type="number" id="auto_num" style="width:40px;" min="2" max="5" value="2">
<input type="checkbox" id="isauto" /><label for="isauto">自動読み込み</label>
<input type="number" id="auto_num" style="width:40px;" min="2" value="2">
</div>
<br>
<small><b><a target="_blank"
Expand Down
34 changes: 30 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,27 @@ let observer = new MutationObserver(function () {
if (document.getElementById("isauto").checked == true) {
document.getElementById("allcommentsetting").style.display = "block";
CommentLimit = document.getElementById("auto_num").value;
CommentLimit = CommentLimit > 5 ? 5 : CommentLimit;
//CommentLimit = CommentLimit > 5 ? 5 : CommentLimit;
LOADCOMMENT("auto");
document.getElementById("zenkomebutton").disabled = true;
}
}, 1000);
}
});
let href = location.href;
function escapeHtml(text) {
var map = {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': "&quot;",
"'": "&#039;",
};

return text.replace(/[&<>"']/g, function (m) {
return map[m];
});
}
function getXMLString(json) {
var parser = new DOMParser();
var xml = '<?xml version="1.0" encoding="UTF-8"?>';
Expand All @@ -352,7 +365,7 @@ function getXMLString(json) {
comments.isPremium ? "1" : "0"
}" anonymity="1" user_id="${
comments.userId
}" mail="${comments.commands.join(" ")}">${comments.body}</chat>
}" mail="${comments.commands.join(" ")}">${escapeHtml(comments.body)}</chat>
`;
}
xml += "</packet>";
Expand Down Expand Up @@ -435,7 +448,7 @@ function PLAYCOMMENT() {
document.getElementById("wrapper_buttons").style.height = "30px";
document.getElementById("wrapper_buttons").style.opacity = "1";
document.getElementsByClassName("scroll")[0].style.height =
"calc(100% - 201px)";
"calc(100% - 221px)";
}, 200);
}
document.getElementById("loaded").style.zIndex = "2";
Expand Down Expand Up @@ -780,6 +793,12 @@ function PREPARE(observe) {
val_stroke[i].innerText = bar_stroke[i].value;
}
}
let l = document.getElementById("load_num");
if (l.value.length >= 4) {
l.style.width = "60%";
} else {
l.style.width = "50%";
}
}

let ng_storage = localStorage.getItem("ng_storage");
Expand Down Expand Up @@ -878,6 +897,13 @@ function PREPARE(observe) {
}, 100);
};
document.getElementById("load_num").oninput = () => {
let l = document.getElementById("load_num");
if (l.value.length >= 4) {
l.style.width = "60%";
} else {
l.style.width = "50%";
}

get_zouryou_config = localStorage.getItem("zouryou_config");
zouryou_config = JSON.parse(get_zouryou_config);
zouryou_config.num = document.getElementById("load_num").value;
Expand Down Expand Up @@ -990,7 +1016,7 @@ function PREPARE(observe) {
if (document.getElementById("isauto").checked == true) {
setting.style.display = "block";
CommentLimit = document.getElementById("auto_num").value;
CommentLimit = CommentLimit > 5 ? 5 : CommentLimit;
//CommentLimit = CommentLimit > 5 ? 5 : CommentLimit;
LOADCOMMENT("auto");
document.getElementById("zenkomebutton").disabled = true;
}
Expand Down

0 comments on commit 9ee500a

Please sign in to comment.