Skip to content

Commit 048c5eb

Browse files
committed
i'll stop messing with main and use doko instead
1 parent 57beb1d commit 048c5eb

File tree

2 files changed

+0
-42
lines changed

2 files changed

+0
-42
lines changed

css/repochan.css

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -288,12 +288,3 @@
288288
background: #555;
289289
}
290290

291-
.highlight-new-comment {
292-
background-color: #ffff99 !important;
293-
animation: highlight-fade 3s ease;
294-
}
295-
296-
@keyframes highlight-fade {
297-
from { background-color: #ffff99; }
298-
to { background-color: inherit; }
299-
}

index.html

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -196,39 +196,6 @@
196196
}
197197
</script>
198198

199-
<script>
200-
// Function to process and highlight new comments
201-
function processComments() {
202-
const prevCommentIds = JSON.parse(localStorage.getItem('prevCommentIds')) || [];
203-
const currentCommentIds = [];
204-
const comments = document.getElementsByClassName('hcb-comment');
205-
206-
Array.from(comments).forEach(comment => {
207-
const id = comment.id;
208-
currentCommentIds.push(id);
209-
if (!prevCommentIds.includes(id)) {
210-
comment.classList.add('highlight-new-comment');
211-
}
212-
});
213-
214-
localStorage.setItem('prevCommentIds', JSON.stringify(currentCommentIds));
215-
}
216199

217-
// Observe when comments are loaded dynamically
218-
document.addEventListener('DOMContentLoaded', function() {
219-
const commentBox = document.getElementById('HCB_comment_box');
220-
if (!commentBox) return;
221-
222-
const observer = new MutationObserver((mutations) => {
223-
const comments = commentBox.getElementsByClassName('hcb-comment');
224-
if (comments.length > 0) {
225-
observer.disconnect(); // Stop observing once comments are found
226-
processComments();
227-
}
228-
});
229-
230-
observer.observe(commentBox, { childList: true, subtree: true });
231-
});
232-
</script>
233200
</body>
234201
</html>

0 commit comments

Comments
 (0)