This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let __timeout = 200; | |
/** | |
* Delete comments: https://www.youtube.com/feed/history/comment_history | |
*/ | |
document | |
.querySelectorAll( | |
'.ytd-comment-history-entry-renderer [aria-label="Action menu"]' | |
) | |
.forEach((el, i) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const query = 'git'; | |
const regexp = new RegExp(`\\b${query}\\b`, 'i'); | |
Array.prototype.slice.apply(document.querySelectorAll('dt > a')).forEach(link => { | |
if (!regexp.test(link.innerHTML)) { | |
link.parentNode.removeChild(link); | |
} | |
}); |