Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: I made an extension to keep Twitter from losing my scroll position (chrome.google.com)
50 points by ack_inc 8 months ago | hide | past | favorite | 29 comments



I just developed a Chrome extension using a content script, very similar to this extension.

Extension author, question: What was your process for getting updates from the content.js script loaded into the browser for testing? Was it reloading the extension through chrome://extensions?

The only thing I found that could work was changing the content script and reloading the extension through chrome://extensions. I didn't see any type of "shortcut" available. Frustrating, and increased time on my change/test feedback loop.

It got to a point where I moved the core logic from my extension into a separate npm package where I got it working through unit tests. Then my browser extension became primarily working with the DOM, and incorporating the results from my package.

shameless plug: Wordle Genie - Wordle Genie integrates directly with the Wordle game to show the remaining possibilities based on the board hints.

extension: https://chromewebstore.google.com/detail/wordle-genie/efmlmf...

source: https://github.com/ryanrodemoyer/wordle_genie


You're right. I had to reload the extension, then reload the page to get my content script changes injected into it.


What I really want is an extension that will let me open a retweet by right clicking and opening it in new tab. That way I don't lose my scroll position and can get a collection of things I want to read. I went looking for such a thing but couldn't find it.

I did find Control Panel for Twitter though, which is a great improvement.


Does middle-clicking the tweet not open it in a new tab?


Hey that works! Thanks!


Shift+click or Ctrl+click works if someone doesn't have a middle button (I forget the exact combo bc it's just in muscle memory from daily use)


Usually: shift is a new window and control is a new tab.


for mac:

cmd+click: new tab in the background

cmd+shift+click: new tab and focus that new tab


You can also right click on the date (next to the username), that is a proper link which has the open in new tab option.


The good: building an app to scratch your itch.

The bad: using Twitter and Chrome in 2024.

I'll see myself out.


I'm surprised to see this, because for all its flaws, Twitter is one of the very few apps that don't lose scroll position for me on either the web or the mobile app.


It works surprisingly well most of the time.

There is an extremely annoying bug though where sometimes a random tweet will just disappear from the timeline. You'll get a brief glimpse and it suddenly disappears. And you may or may not come across it later. As though it jumped further down the line.

Anyone else notice that? What in the world might be happening there? This has been an issue for at least a couple years now.


Agreed; in fact, I've wondered how they managed to make it work so well previously. (But, haven't used Twitter lately, so maybe it broke.)


Twitter loses your scroll position when you go from a Tweet thread to a reply thread, then come back. This is what the extension fixes.

Twitter does keep your scroll position when you go from a "top-level" view ("For you", "Following", ...) to a Tweet thread, then come back.


I cannot reproduce this, but I don't doubt it happens for other users. Guess I am in the lucky bucket. Maybe Firefox users get an older version without some new "improvements". :)

Edit: Nevermind, it happens to me as well, I just never noticed.


How interesting. I experience this problem on both Chrome and Firefox (v121.0.1 on Ubuntu 22.04).

I am mildly curious about why only a subset of Firefox users are experiencing this. Do you mind sharing your Firefox version and OS?


I went to do a sanity check using your steps and unfortunately I missed the problem the first time around - when I go to a tweet thread, then a reply thread, then come back to the tweet thread, it is indeed scrolled all the way up to the top. So I was wrong, I am affected by the same issue, I just never realized it until I went looking for it. One positive I'm taking away from this is the realization that I use Twitter less intensively than I thought, because I wouldn't have noticed this without the explicit steps I don't think. :D


Same here, even after scrolling pretty far (on For you) if I click to open a post(?) and then the "left arrow" to go back to the feed my position is usually the same.


I think it used to, but recently it has been bad.


Hope this was a good exercise in extension building because I don't think its advisable to work on personal projects involving Twitter at this point


Nice. Instant download.

EDIT: the flash is a bit extreme on dark mode, and hides the text. Would be good to make this just a light alpha overlay which fades the same way, or / and ability to just turn the flash off


Hah, didn't even know Twitter had a dark mode.

I've updated the extension to use a dark-mode-friendly highlight color when appropriate. The update should pass the web store review process in a couple days (hopefully).


Also need an extension that would block the 'feature' of pausing the video when you scroll it out of view.

I swear these brain-dead social media websites get stupider every year. Worse yet, they pick up each other's bad habits (Tiktok -> Twitter -> Instagram in this case it went)


They’re optimizing their apps for scrolling as many ads into the viewport as possible, hence pausing videos as they exit the viewport. Everything that is not an ad is a distraction from ads.


was this working in the past?


Yes, definitely (for me at least) - broke a while ago, not exactly sure when.


Not sure. I just found myself noticing the scroll-position loss repeatedly over a few weeks of browsing Twitter, and figured I didn't have to wait for an official fix.


Cool, you created an extension for browsing a hate speech-promoting platform, good for you.


I don't disagree with your take, but I'd say that's not the only valid take.

One could argue this is an extension for a breaking-news browsing platform.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: