Skip to content

Instantly share code, notes, and snippets.

@rosswintle
Last active February 22, 2026 15:46
Show Gist options
  • Select an option

  • Save rosswintle/92f534f0e0ab37d52b4df3b4bf8ebb45 to your computer and use it in GitHub Desktop.

Select an option

Save rosswintle/92f534f0e0ab37d52b4df3b4bf8ebb45 to your computer and use it in GitHub Desktop.
Feedbin: Keep selected centered
// ==UserScript==
// @name Center selected item
// @namespace http://tampermonkey.net/
// @version 2026-02-22
// @description try to take over the world!
// @author Ross Wintle
// @match https://feedbin.com/
// @icon https://www.google.com/s2/favicons?sz=64&domain=feedbin.com
// @grant GM_addStyle
// ==/UserScript==
// BONUS: Make read items obvious even when selected.
GM_addStyle(".theme-auto .entry-summary.selected.read .entry-summary-inner { color: rgba(255,255,255,0.6); }");
(function() {
'use strict';
function centerItem(itemElement) {
const container = itemElement.closest('.entries');
const newScroll = itemElement.offsetTop - container.offsetHeight / 2 + itemElement.offsetHeight / 2;
container.scrollTo({ left: 0, top: newScroll, behavior: 'smooth' });
}
document.querySelector('.entries-column').addEventListener('keyup', function (e) {
if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
const currentItem = document.querySelector('.entry-summary.selected');
centerItem(currentItem);
}
});
document.querySelector('.entries-column').addEventListener('click', function (e) {
const item = e.target.closest('.entry-summary');
if (item) {
centerItem(item);
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment