>>883905after creating a new userscript that runs on all youtube videos, paste in this blob of code:
(function() {
'use strict';
const targetNode = document.body;
const config = { attributes: false, childList: true, subtree: true };
// Callback function to execute when mutations are observed
const callback = function(mutationsList, observer) {
for (let mutation of mutationsList) {
if (mutation.target.tagName == "YT-FORMATTED-STRING" &&
mutation.target.id == "content-text" && mutation.target.slot == "content" && mutation.target.classList.contains('ytd-comment-renderer')) {
let blankCount = 0;
let nodes = mutation.target.querySelectorAll('span');
for (let i = 0; i < nodes.length; i++) {
if (nodes
.textContent == '\n') {
blankCount++;
} else {
blankCount = 0;
}
if (blankCount == 3) {
mutation.target.style.backgroundColor = "red";
mutation.target.style.fontWeight = "bold";
return;
}
}
}
}
};
// Create an observer instance linked to the callback function
const observer = new MutationObserver(callback);
// Start observing the target node for configured mutations
observer.observe(targetNode, config);
// Later, you can stop observing
//observer.disconnect();
})();
first, i just want to make sure it actually works with your setup before adding the final step that hides the comments. check and see if the matched comments get highlighted like pic related.
this code is totally retarded by the way. I can make it much more efficient. the first step is getting the feature working, however