Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tanbatu committed Jan 31, 2024
1 parent 19ad5d6 commit d9521d0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion files/setting.html
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@
opacity: 0.5;
padding: 8px;
position: absolute;
">v6.3<br><small>(23/09/24)</small></p>
">v6.4<br><small>(24/02/01)</small></p>
</a>

<div style="padding:14px;display: flex;">
Expand Down
27 changes: 21 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,12 @@ async function LOADCOMMENT(mode) {
fork: "comment-zouryou",
id: 0,
},
{
commentCount: ownerComments.length,
comments: ownerComments, //投稿者コメントにフィルターを適用する?
fork: "owner",
id: 1,
},
];
load_NiconiComments();
clearInterval(list_interval);
Expand Down Expand Up @@ -627,14 +633,18 @@ function LIST_COMMENT() {
document.getElementById("comment_list_comments").innerHTML = "";
for (let i = 0; i < 30; i++) {
let body = COMMENT[0].comments[passIndex - i]?.body;
let nicoru = COMMENT[0].comments[passIndex - i]?.nicoruCount;
let nicoru = COMMENT[0].comments[passIndex - i]?.nicoruCount || "";
if (body == undefined) body = "";
let commentElement = document.createElement("div");
commentElement.className = "list_comment";
commentElement.innerHTML = `<div style="padding:0px 2px;display:flex;background-color:rgba(243, 186, 0, ${
nicoru / 10
})"><p style="width:95%;">${body}</p><p style="padding-top:4px;width:5%;">${nicoru}</p></div>`;
document.getElementById("comment_list_comments").prepend(commentElement);
if (body != "") {
commentElement.innerHTML = `<div style="padding:0px 2px;display:flex;background-color:rgba(243, 186, 0, ${
nicoru / 10
})"><p style="width:95%;">${body}</p><p style="padding-top:4px;width:5%;">${nicoru}</p></div>`;
document
.getElementById("comment_list_comments")
.prepend(commentElement);
}
}
}, 30);
}
Expand Down Expand Up @@ -741,6 +751,11 @@ function PREPARE(observe) {
);
videoElement = document.querySelector("#MainVideoPlayer > video");

let seekBar = document.getElementsByClassName("SeekBar")[0];
if (seekBar.classList.contains("is-disabled")) {
seekBar.classList.remove("is-disabled");
}

SuperDanmakuCanvasElement.width = 640;
SuperDanmakuCanvasElement.height = 360;

Expand Down Expand Up @@ -1150,4 +1165,4 @@ const start = setInterval(() => {
clearInterval(start);
}
}, 50);
console.log("✨コメント増量 v6.3\nCopyright (c) 2022 tanbatu.");
console.log("✨コメント増量 v6.4\nCopyright (c) 2022 tanbatu.");
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "コメント増量",
"description": "ニコニコ動画のコメントの表示量を増やす",
"version": "6.3",
"version": "6.4",
"content_scripts": [
{
"matches": [
Expand Down

0 comments on commit d9521d0

Please sign in to comment.