Answer the question
In order to leave comments, you need to log in
How to hide the comments of a blocked user on VKontakte?
There is a VKontakte user whom I added to the blacklist. With this user, we are in the same community (group). This user leaves comments under the posts of the group. I would not like to see only his comments. It is impossible to do this using VKontakte. The only thing I found on my problem is the Chrome extension "VK Comment Blocker", but this extension blocks absolutely all comments in the news feed, or in the community, and I only need to remove the comments of a specific person or users from my VKontakte blacklist. Are there ready-made solutions for this task? If there are no ready-made ones, how is it possible to solve this problem using programming / scripting methods?
Answer the question
In order to leave comments, you need to log in
1) Install the chrome extension
https://chrome.google.com/webstore/detail/user-jav...
It allows you to write scripts for the page
2) Write something like this script for vk.com
const blocked = `
Иван Говнов
Еще ненавистный юзер
И еще один нехороший человек
`
const filter = new Set(blocked.split('\n').filter(Boolean))
setInterval(() => {
const authSpan = [...document.querySelectorAll('.author')]
.filter(v => filter.has(v.textContent))
authSpan.forEach(el =>
el.parentElement.parentElement.parentElement.style.display = 'none')
}, 3000)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question