Skip to content

Instantly share code, notes, and snippets.

@andre-st
Last active February 12, 2023 06:23
Show Gist options
  • Save andre-st/1b00959f72d1e7e8984d855fb4ee4677 to your computer and use it in GitHub Desktop.
Save andre-st/1b00959f72d1e7e8984d855fb4ee4677 to your computer and use it in GitHub Desktop.
#injectjs
//////////////////////////////////////////////////////////////////////////////
//
// COMMAFEED.COM
//
// Mark all read button:
// - we enlarge the button, so users can reach and click it faster
// - we disable the button on "All feeds" because accidently clicking will mark more
// feeds as read than displayed when additional feeds were loaded in the meantime
//
mixin( ['https://www.commafeed.com/'], () =>
{
const isAllFeeds = window.location.href == 'https://www.commafeed.com/#/feeds/view/category/all';
const markReadBtn = document.querySelector( '#toolbar-mark-read a.btn' );
if( isAllFeeds )
markReadBtn.setAttribute( 'disabled', 'true' );
else
markReadBtn.removeAttribute( 'disabled' );
});
mixin( "https://www.commafeed.com",
`
#toolbar-mark-read a.btn
{
width: 150px;
}
#toolbar-mark-read .btn[disabled]
{
background-color: #FFDDDD;
}
`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment