T
T
Torrtl2021-03-31 14:36:28
In contact with
Torrtl, 2021-03-31 14:36:28

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

2 answer(s)
D
Dmitry, 2021-03-31
@Torrtl

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)

And that's all, with a frequency of 3 seconds, the script will monitor comments on the open page and hide the messages of hated characters.

A
acwartz, 2021-03-31
@acwartz

A user-script is written that reads your block list through a public / non-public web-api, and filters the contents of comment blocks using it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question