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.
}
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.