News for hackers. Stuff that matters.
Re:Twitter is at its best when verified accounts can’t tweet by wonder_er on Thursday July 16, 2020 @11:33AM (#23860014)
This is fascinating.

I just threw together some absolutely atrocious javascript to make this "verified accounts can't tweet" a feature.

Fire up the console, and run:

```

javascript

var verified = document.querySelectorAll('[aria-label="Verified account"]');

for (var i = 0; i < verified.length; i++) {

verified[i].parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.

parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.innerHTML = ""

}

```

At least for me, this deletes the DOM nodes for all tweets from verified users in my timeline.

I don't want to permanently unfollow all verified users, but having an option to hide all activity associated with those accounts in my timeline? That'd be nice.

If anyone who actually knows what they're doing wants to suggest a smarter solution, or make a chrome plugin that does just this, I'd be forever grateful!

Re:Twitter is at its best when verified accounts can’t tweet by insin on Thursday July 16, 2020 @01:06PM (#23861052)
I've just added this as a "Verified accounts" feature you can toggle on in the options of my Tweak New Twitter extension (v1.23 - Chrome Web Store always takes a while to update):

https://github.com/insin/tweak-new-twitter#tweak-new-twitter

If you just want to check how much of your timeline is driven by verified accounts, you can also have them highlighted instead of hidden:

https://imgur.com/gallery/lcqq5bq

Re:Twitter is at its best when verified accounts can’t tweet by wonder_er on Thursday July 16, 2020 @01:48PM (#23861613)
Wow! This extension is amazing!

I'm the OP that shared the crazy JS script to temporarily delete/hide tweets from verified users.

I just installed this extension for Firefox, and it's a breath of fresh air.

Thank you!

I tried to update my original comment to say

> https://github.com/insin/tweak-new-twitter#tweak-new-twitter does everything I'm suggesting here and better, permanently, etc, go install it

but it's too old of a comment to edit.

Re:Twitter is at its best when verified accounts can’t tweet by Kye on Thursday July 16, 2020 @02:10PM (#23861919)
What stands out to me is how empty Twitter is without all those widgets that exist only to juice engagement. The new much older Twitter-inspired default Mastodon layout is how I wish Twitter still was with sidebar widgets serving function instead of investors.

https://blog.joinmastodon.org/2019/06/mastodon-2.9/

I don't want a whole column devoted to pushing the latest horrors of the world on me and a bunch of people I don't know or have any interest in following. And that's with ads blocked.

Re:Twitter is at its best when verified accounts can’t tweet by jchw on Thursday July 16, 2020 @01:38PM (#23861472)
Oh hey, thanks for this extension, I swear this extension is the only reason I find Twitter nearly tolerable anymore. (Of course extensions can't fix the toxicity of Twitter itself, but hey.)
Re:Twitter is at its best when verified accounts can’t tweet by nabaraz on Saturday July 18, 2020 @04:18AM (#23879926)
I use this extension everyday. One request is to make center content take full width (since I hide the sidebar and other widgets).

Thanks for the extension!

Re:Twitter is at its best when verified accounts can’t tweet by insin on Saturday July 18, 2020 @11:53PM (#23886856)
I created an issue for this with a snippet you can use in your browser console to try it out - what do you think of the resulting size of media tweets?

https://github.com/insin/tweak-new-twitter/issues/25

Re:Twitter is at its best when verified accounts can’t tweet by NickGott on Thursday July 16, 2020 @11:09PM (#23866580)
Just wanted to let you know this extension is fantastic, awesome work
Re:Twitter is at its best when verified accounts can’t tweet by hombre_fatal on Thursday July 16, 2020 @11:50AM (#23860213)
fwiw, node.closest(selector) lets you query up the tree for the first parent that matches.

    for (const node of document.querySelectorAll('[aria-label="Verified account"]')) {
      node.closest('[role="article"]').remove()
    }
Doesn't get the most top-level wrapper, but it also works well with retweets. Doesn't work with verified replies though (removes the verified tweet reply but not the other person's tweet), too lazy to look.
Re:Twitter is at its best when verified accounts can’t tweet by ihuman on Thursday July 16, 2020 @01:52PM (#23861659)
I converted your code into a uBlock Origin filter. For replies, it also only removes the verified reply. I tried to get it to work, but I think that might be impossible with just CSS selectors.

  twitter.com##[role="article"]:has([aria-label="Verified account"])
Re:Twitter is at its best when verified accounts can’t tweet by sergeykish on Thursday July 16, 2020 @04:08PM (#23863286)
uBlock Origin supports XPath

    ##:xpath(//*[@role="article"][descendant::*[@aria-label="Verified account"]])
Unfortunately no document.queryXPathAll but is easy to shim [2]. It is great technology, sadly not known.

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/:has

[2] http://sergeykish.com/web-api-element-prototype-queryxpathal...

Re:Twitter is at its best when verified accounts can’t tweet by protomyth on Thursday July 16, 2020 @11:36AM (#23860039)
Nice. Thinking about it, also deleting the whole right column (trending, who to follow) would really make Twitter a happier place.
Re:Twitter is at its best when verified accounts can’t tweet by wonder_er on Thursday July 16, 2020 @11:39AM (#23860082)
For a while, I could use uBlock to delete all those unwanted columns. It was effortless and permanent. I wrote up the instructions here:

https://josh.works/take-back-your-attention

But a year ago or so, Twitter redesigned the front-end. Now the class names constantly change, and my CSS Selector knowledge isn't good enough to write flexible-enough rules to keep these unwanted elements blocked.

:(

I'd pay someone to pair with me on writing good uBlock rules that make these deletions permanent.

I'd also like to remove all re-tweets and all instances of "so-and-so liked this tweet". uBlock consistently removes all advertisements from the timeline, so... small win.

If you read this and wanna be involved, shoot me an email: [email protected]

I'd of course publish what we come up with so others could use it!

Re:Twitter is at its best when verified accounts can’t tweet by ldd on Thursday July 16, 2020 @11:41AM (#23860104)

  twitter.com##[aria-label="Timeline: Trending now"]
  twitter.com##[aria-label="Relevant people"]
I use those rules on uBlock origin. let me know if it helps!
Re:Twitter is at its best when verified accounts can’t tweet by wonder_er on Thursday July 16, 2020 @11:51AM (#23860218)
Whoa! Game changing! I never thought to search for aria-labels.

I immediately and joyfully added your rules to uBlock, and it works like a charm!

I ended up expanding on the concept:

  twitter.com##[aria-label="Timeline: Trending now"]
  twitter.com##[aria-label="Relevant people"]
  twitter.com##[aria-label="Search and explore"]
  twitter.com##[aria-label="Footer"]
  twitter.com##[aria-label="Who to follow"]
Re:Twitter is at its best when verified accounts can’t tweet by ldd on Thursday July 16, 2020 @11:57AM (#23860284)
great!

Paradoxically, I do need to start using twitter to market my game, but I dread spending time on that site.

I'll probably try to only go there once a week. Social media is weird.

Re:Twitter is at its best when verified accounts can’t tweet by kbenson on Thursday July 16, 2020 @03:10PM (#23862656)
About a year ago I tried getting into Twitter because it seemed like there were a few people I might want to follow, so I dutifully read a few people I knew about and added people they retweeted that seemed interesting.

About a week or two in I tried engaging on a topic in a HN style way where I tried to ask questions and probe for something deeper (my first mistake), and on something where I sort of questioned the party line on a trending topic (my second mistake). I was actually wrong in some of my assumptions I was using at that time, but everyone was so busy assuming I was acting bad faith and trying to troll (and responding how they thought appropriate) that not one person could actually engage with me enough to even figure that out even though I tried to keep it entirely civil, I had to learn it myself a few hours later (and I did go back with a mea culpa). I only lasted about another week reading items on the platform regularly as it became obvious that this is just the expectation of how discourse happens on Twitter.

I mean, I don't expect it to be like HN, but I also don't expect people to assume racist troll is the obvious and most likely option when I open my mouth, and that's how it feels on Twitter. What's worse, I'm not sure that's not a rational approach on the platform given how people on it act, which is why I don't want to be there.

Twitter's like a giant set of improv performances where everyone is performing for their friends and private audiences in an effort to be the most extreme version of themselves, but all those performances are banging into each other and feeding off each other. Interesting and weird at first, until you realize it's all so terribly draining.

Re:Twitter is at its best when verified accounts can’t tweet by chrisweekly on Thursday July 16, 2020 @12:35PM (#23860672)
If I get a chance to look closer I will, but want to lazily suggest it'd be ideal, if possible, to use some identifier that's not a11y-related -- in case this takes off and Twitter's incentivized to remove the labels (at the expense of those who depend on the aria-labels to access the site's content).
Re:Twitter is at its best when verified accounts can’t tweet by snypher on Thursday July 16, 2020 @12:50PM (#23860857)
>a11y

I understand a16z is a name but writing other words in this style is very difficult to understand. It would be great for people to use the full term 'accessibility'.

Re:Twitter is at its best when verified accounts can’t tweet by chrisweekly on Thursday July 16, 2020 @01:41PM (#23861522)
I hear you, but in this case (A) there was a ton of relevant context about aria-label, and (B) HN (HackerNews) is a technical community, and on the web, "a11y" has been in very widespread, even mainstream usage for many years, to refer to "accessibility". Notice how "a11y" looks like lowercase "ALLY", as in ally or friend, of the differently-abled.
Re:Twitter is at its best when verified accounts can’t tweet by chrisweekly on Thursday July 16, 2020 @10:29PM (#23866343)
... and (C) I was commenting from my phone.
Re:Twitter is at its best when verified accounts can’t tweet by vxNsr on Thursday July 16, 2020 @01:12PM (#23861122)
One might even say it makes the conversation less “accessible”
Re:Twitter is at its best when verified accounts can’t tweet by Izkata on Thursday July 16, 2020 @01:48PM (#23861610)
Huhm, I don't know a16z, but I do know a11y and i18n...
Re:Twitter is at its best when verified accounts can’t tweet by Kye on Thursday July 16, 2020 @02:18PM (#23862014)
I know of them, but I can never remember them, and I wouldn't know how to search for them. I'm not sure what they were thinking when they came up with inaccessible accessibility terms.
Re:Twitter is at its best when verified accounts can’t tweet by lxdesk on Thursday July 16, 2020 @08:35PM (#23865626)
Neat fact: I learned the other week that this exact format(first, last, number of characters in between) is how old Forths compressed the word encoding. It has a very low collision rate.
Re:Twitter is at its best when verified accounts can’t tweet by chrisweekly on Thursday July 16, 2020 @10:28PM (#23866331)
That comment is a perfect example of what I love about HN; a polite tangential discussion about abbreviations unearthing a wholly unexpected connection to a clever technical hack. Thank you for sharing! :)
Re:Twitter is at its best when verified accounts can’t tweet by chrisweekly on Saturday July 18, 2020 @11:01PM (#23886678)
"I wouldn't know how to search for them"

I don't believe you are incapable of typing "a11y" into your browser's location bar.

Re:Twitter is at its best when verified accounts can’t tweet by jakear on Thursday July 16, 2020 @12:44PM (#23860773)
Not likely. Accessibility is required by law, no way twitter’s legal would be down with arguing “yes well you see we had to make it inaccessible because people were using accessibility labels to block the sidebar with trending topics from showing up on their page”
Re:Twitter is at its best when verified accounts can’t tweet by WrtCdEvrydy on Thursday July 16, 2020 @12:31PM (#23860628)
Well, bet you the next version of Twitter will say "Fuck you, blind people" for all aria-labels.
Re:Twitter is at its best when verified accounts can’t tweet by robbyking on Thursday July 16, 2020 @11:39AM (#23860077)
This is why I use StyleBot! I don't customize every page I visit, but it makes a huge difference for sites I view regularly.

Here's my custom Hacker News style: https://i.imgur.com/KbP5VAX.png

And Craigslist: https://i.imgur.com/uTyST6P.png

Re:Twitter is at its best when verified accounts can’t tweet by josefresco on Thursday July 16, 2020 @11:52AM (#23860224)
Yeah Stylebot! I use it to fix UI annoyances on my daily favorite websites. I spend all day using browser developer tools, why not use my skills to improve my favorite websites?
Re:Twitter is at its best when verified accounts can’t tweet by iagovar on Thursday July 16, 2020 @11:44AM (#23860145)
I use a similar solution, I like to modify the CSS of pages I visit, so I can avoid absurd design choices.

Anyway the HN design is almost the pinnacle of perfection to me.

Re:Twitter is at its best when verified accounts can’t tweet by Flimm on Thursday July 16, 2020 @11:52AM (#23860225)
(I like HN's design as well, except when I am using a touchscreen.)
Re:Twitter is at its best when verified accounts can’t tweet by moneywoes on Thursday July 16, 2020 @11:39AM (#23860087)
What is your configuration
Re:Twitter is at its best when verified accounts can’t tweet by dgut on Thursday July 16, 2020 @12:15PM (#23860455)
I love this thread. Personally I use Twitter to follow people who write interesting tweets about programming, but the trending sidebar tries very hard to make anybody anxious.
Re:Twitter is at its best when verified accounts can’t tweet by wonder_er on Thursday July 16, 2020 @01:53PM (#23861681)
This problem might already be solved!

The creator of https://github.com/insin/tweak-new-twitter dropped by and brought this tool to my attention.

It's everything I wanted, works perfectly, has plugins for Chrome and Firefox.

Check it out! Might be exactly what you need.

Re:Twitter is at its best when verified accounts can’t tweet by jfg on Thursday July 16, 2020 @11:48AM (#23860185)
For me, you can target the sidebar with the rule: div[data-testid="sidebarColumn"] .r-1u4rsef

and promoted tweets (in light mode): .css-1dbjc4n.r-my5ep6.r-qklmqi.r-1adg3ll div[data-testid="placementTracking"]:not(.r-u8s1d)

Obviously very fragile, but has been working fo the last month or so

Re:Twitter is at its best when verified accounts can’t tweet by wonder_er on Thursday July 16, 2020 @12:02PM (#23860336)
It's those auto-generated class names that kill me. :( They change all the time.

An earlier suggestion just worked for me, and I suspect it'll be durable:

  twitter.com##[aria-label="Timeline: Trending now"]
  twitter.com##[aria-label="Relevant people"]
I ended up adding more labels:

  twitter.com##[aria-label="Timeline: Trending now"]
  twitter.com##[aria-label="Relevant people"]
  twitter.com##[aria-label="Search and explore"]
  twitter.com##[aria-label="Footer"]
  twitter.com##[aria-label="Who to follow"]
  twitter.com##[aria-label="Search Twitter"]

Now my twitter looks like this:

https://share.getcloudapp.com/v1ue8EZY

Here's a pastebin of all my twitter-related rules. You can see I've tried to manually delete a _lot_ of nodes.

https://pastebin.com/Q6X8PrGu

Re:Twitter is at its best when verified accounts can’t tweet by cbhl on Thursday July 16, 2020 @12:13PM (#23860426)
Permanently unfollowing all verified users wouldn't even remove all the verified tweets from your timeline, since non-verified users might retweet verified users.
Re:Twitter is at its best when verified accounts can’t tweet by wonder_er on Thursday July 16, 2020 @01:53PM (#23861675)
Turns out something that does this already exists!

The creator of https://github.com/insin/tweak-new-twitter dropped by and brought this tool to my attention.

It's everything I wanted, works perfectly, plugins for Chrome and Firefox.

Check it out! Might be exactly what you need.

Re:Twitter is at its best when verified accounts can’t tweet by amatecha on Thursday July 16, 2020 @01:26PM (#23861334)
Yeah, I've actually got a custom Chrome Extension I've been working on to do stuff like this, though more around deleting Promoted tweets, tweets from people I don't follow ("buddy liked [stupid tweet I don't want to see]")... I had it working perfectly until the recent redesign. Even re-filtered as I scrolled, by hooking into the same lazy-load events they used... One day I'll get it working again! Thing is, posting it on the Extensions directory requires paying $5 and I also imagine Twitter might take action against my account if I posted a browser extension that blocks their Promoted tweets...
Re:Twitter is at its best when verified accounts can’t tweet by wonder_er on Thursday July 16, 2020 @01:53PM (#23861667)
Turns out this tool already exists! The creator of https://github.com/insin/tweak-new-twitter dropped by and brought this tool to my attention.

It's everything I wanted, works perfectly, plugins for Chrome and Firefox.

Check it out! Might be exactly what you need.

Re:Twitter is at its best when verified accounts can’t tweet by amatecha on Thursday July 16, 2020 @02:06PM (#23861854)
Ah nice that's amazing, I'll check it out. Thanks!! :D
Re:Twitter is at its best when verified accounts can’t tweet by skykooler on Thursday July 16, 2020 @04:48PM (#23863651)
> ...parentElement.parentElement.parentElement.parentElement.parentElement.parentElement...

I feel like there's got to be a more concise way to do that.

Re:Twitter is at its best when verified accounts can’t tweet by dogfoods on Thursday July 16, 2020 @02:03PM (#23861802)
> a smarter solution,

Add the following to your hosts file

  127.0.0.1 twitter.com
This saves you from even loading those DOM elements in the first place
Re:Twitter is at its best when verified accounts can’t tweet by fearingreprisal on Thursday July 16, 2020 @05:44PM (#23864152)
This is the real answer right here.
Re:Twitter is at its best when verified accounts can’t tweet by dang on Thursday July 16, 2020 @02:21PM (#23862029)
Forgive me while I try to fix the formatting on this comment (it was breaking the page layout). HN's markdown to HTML translator is choking here...

Edit: ok, a line break has been visited upon the ninth generation. I think that's the minimal fix.

The problem is that very long lines of code that the browser interprets as a single word end up blowing HN's table layout. We're working on a fix.