Discussions » Creation Requests

A Script that filters blue checkmark replies under twitter tweets

§
Posted: 22 April 2023
Edited: 22 April 2023

Hi Script Wizards

For some time now Twitter blue subscribers replies under tweets are put on the top of every tweet while non subscribers there replies are obscured into the nothingness. I would love to read some replies from people that don't have the tick. But i have to go trough a sea of verified replies before i can read them. I'm sick and tired of these blue check-marks being on top under every tweet and would love being able to filter them out.

Is there a Wizard that could make this possible?

§
Posted: 23 April 2023
Edited: 23 April 2023

This should work:

// @match *://twitter.com/*/status/*

Array.from(document.querySelectorAll('div[data-testid="cellInnerDiv"]')).forEach((a) => a.children.item(0).children.item(0)?.querySelector('svg[aria-label="Verified account"]') ? a.parentElement.removeChild(a) : null);
§
Posted: 23 April 2023

That code does exactly what you asked, however, actually removing verified tweets isn't possible because:
1. Twitter loads tweets. This means, after you've removed a batch of tweets when you scroll down, more will come.
2. Twitter checks to see if tweets are removed, and if so it'll remove all tweets and ask you to reload: "Something went wrong".

§
Posted: 27 April 2023

This should work:

// @match *://twitter.com/*/status/*

Array.from(document.querySelectorAll('div[data-testid="cellInnerDiv"]')).forEach((a) => a.children.item(0).children.item(0)?.querySelector('svg[aria-label="Verified account"]') ? a.parentElement.removeChild(a) : null);

Omg. Sorry for the late reply. Thank you for taking the time to create this script. I trying to figure out to make this work, but i think i'm doing something wrong. I created a new script in Greasemonkey (firefox) and i copied the text into it and saved it. But it doesn't seem to work. Any suggestions?

NotYouMod
§
Posted: 27 April 2023

@Kingkong050, Einstein is jealous of you.

// ==UserScript==
// @name Filter Blue Checkmark Replies
// @version 1.0.0
// @description filter blue checkmark replies under twitter tweets
// @namespace -
// @match *://twitter.com/*/status/*
// @run-at document-idle
// @grant none
// ==/UserScript==

Array.from(document.querySelectorAll('div[data-testid="cellInnerDiv"]')).forEach((a) =>
  a.children.item(0).children.item(0)?.querySelector('svg[aria-label="Verified account"]')
    ? a.parentElement.removeChild(a)
    : null
);
§
Posted: 27 April 2023

@Kingkong050, Einstein is jealous of you.

// ==UserScript==
// @name Filter Blue Checkmark Replies
// @version 1.0.0
// @description filter blue checkmark replies under twitter tweets
// @namespace -
// @match *://twitter.com/*/status/*
// @run-at document-idle
// @grant none
// ==/UserScript==

Array.from(document.querySelectorAll('div[data-testid="cellInnerDiv"]')).forEach((a) =>
  a.children.item(0).children.item(0)?.querySelector('svg[aria-label="Verified account"]')
    ? a.parentElement.removeChild(a)
    : null
);

Nice!. But it seem that the script doesn't work. Or im still doing something wrong.

Ty for trying tho.

@Kingkong050, Einstein is jealous of you.

Lies!!
§
Posted: 13 Mei 2023

As I said:


That code does exactly what you asked, however, actually removing verified tweets isn't possible because:
1. Twitter loads tweets. This means, after you've removed a batch of tweets when you scroll down, more will come.
2. Twitter checks to see if tweets are removed, and if so it'll remove all tweets and ask you to reload: "Something went wrong".

Also, that code wouldn't work as a normal user script because tweets aren't displayed as soon as the site opens, instead it loads into place after a couple seconds. So, to fix that you'd use `@run-at context-menu` instead of "document-idle".

But like I said, using the code as a user script is pointless because what you're asking isn't possible.

Post reply

Sign in to post a reply.