Auto-refreshing Bluesky Timeline (web)

Auto-refreshing Bluesky Timeline (web)

The one main issue I have with the official Bluesky Client is that the thing doesn't automatically refresh the timeline when new content is ready - which is annoying because I like to keep it open on the desktop as a kind of news firehose. While other third party clients do refresh it, they don't merge all my followed feeds into one column like the official one does. 

This code seems to do the trick of  simulating a click on the "load new posts" button when it appears if I haven't scrolled down the page (i.e. I'm reading something). It checks for the presence of the button every 15 seconds: 

(I'm very sure this can be improved.) 

 (function() {

var lastScrollTop = 0;

// Function to check if the user has scrolled down

function hasScrolled() {

var currentScrollTop = window.pageYOffset || document.documentElement.scrollTop;

return currentScrollTop > lastScrollTop;

}

// Function to check for the button and click it if conditions are met

function checkButtonAndClick() {

var button = document.querySelector('button[aria-label="Load new posts"]');

if (button && !hasScrolled()) {

button.click();

}

// Set an interval to check for the button and click it every 15 seconds

setInterval(checkButtonAndClick, 15000);

})();


I use it in the custom user.js in the Ferdium multi-client software but I'm sure it could be adapted to other contexts.

}

Paisley P. Peinforte

About Paisley P. Peinforte

A hater of Active voice, Lady Peinforte is titled nobility of the nation of Sealand. Having successfully invaded both America and Canada from her home base in Windsor, she has become horribly corrupted by the world, and is dedicated to "creating the greatest 'Ship of them all". She ponders horribly terrible, idiotic things for your amusement.


blog image

~explanation~

I'm a snarky, semi-horrible human being given to penning intentionally bad epic slashfiction involving improbable objects and individuals, with the ultimate ambition of befouling Kindle with it one day,which is ostensibly what this blog is for.

In practice, however, it tends to mainly be a circular file for my various thoughts and ideas, some whimsical and others not, in addition to my various Photoshop experiments, mainly collections of what I originally generated for Twitter but now do for Mastodon Threads Bluesky thanks to Twitter becoming a fascist hellscape.

I also have a sideproject doing art for my addition to Doctor Who fanon, Karnian Script which is a more sigil-based, witchy take on Galifreyan variants.