Skip to content

Instantly share code, notes, and snippets.

@andreyvolokitin
andreyvolokitin / delete-youtube-comments.js
Created February 23, 2020 15:44
YouTube delete all comments and chat history
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) => {
@andreyvolokitin
andreyvolokitin / bookmarksSearch.js
Created December 9, 2018 17:03
Search exported bookmarks HTML via browser console
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);
}
});