Last active
February 12, 2023 06:23
-
-
Save andre-st/1b00959f72d1e7e8984d855fb4ee4677 to your computer and use it in GitHub Desktop.
#injectjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////////////////////////////////////////////////////////////////////////////// | |
// | |
// 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