11 ms·
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, a
by wonder_er 6y ago
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!
- protomyth 6y agoNice. Thinking about it, also deleting the whole right column (trending, who to follow) would really make Twitter a happier place.
- robbyking 6y agoThis 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 https://i.imgur.com/KbP5VAX.png And Craigslist: https://i.imgur.com/uTyST6P.png https://i.imgur.com/uTyST6P.png
- moneywoes 6y agoWhat is your configuration
- iagovar 6y agoI 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.
- Flimm 6y ago(I like HN's design as well, except when I am using a touchscreen.)
- josefresco 6y agoYeah 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?
- wonder_er 6y agoFor 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 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: joshthompson@hey.com I'd of course publish what we come up with so others could use it!
- ldd 6y agotwitter.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!
- wonder_er 6y agoWhoa! 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"]
- ldd 6y agogreat! 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.
- kbenson 6y agoAbout 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.
- jfg 6y agoFor 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
- wonder_er 6y agoIt'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 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 https://pastebin.com/Q6X8PrGu
- dgut 6y agoI 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.
- wonder_er 6y agoThis problem might already be solved! The creator of https://github.com/insin/tweak-new-twitter 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.
- hombre_fatal 6y agofwiw, 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.
- ihuman 6y agoI 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"])
- sergeykish 6y agouBlock 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 https://developer.mozilla.org/en-US/docs/Web/CSS/:has [2] http://sergeykish.com/web-api-element-prototype-queryxpathall http://sergeykish.com/web-api-element-prototype-queryxpathal...
- cbhl 6y agoPermanently unfollowing all verified users wouldn't even remove all the verified tweets from your timeline, since non-verified users might retweet verified users.
- wonder_er 6y agoTurns out something that does this already exists! The creator of https://github.com/insin/tweak-new-twitter 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.
- insin 6y agoI'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 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 https://imgur.com/gallery/lcqq5bq
- jchw 6y agoOh 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.)
- wonder_er 6y agoWow! 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 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.
- Kye 6y agoWhat 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/ 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.
- NickGott 6y agoJust wanted to let you know this extension is fantastic, awesome work
- amatecha 6y agoYeah, 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...
- wonder_er 6y agoTurns out this tool already exists! The creator of https://github.com/insin/tweak-new-twitter 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.
- amatecha 6y agoAh nice that's amazing, I'll check it out. Thanks!! :D
- dang 6y agoForgive 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.
- dogfoods 6y ago> 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
- fearingreprisal 6y agoThis is the real answer right here.
- skykooler 6y ago> ...parentElement.parentElement.parentElement.parentElement.parentElement.parentElement... I feel like there's got to be a more concise way to do that.