Created
May 4, 2022 20:03
-
-
Save jdecool/10e918f765cb442f63a5fbe7f740ca21 to your computer and use it in GitHub Desktop.
Tampermonkey - Miniflux - Filter empty categories
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
// ==UserScript== | |
// @name miniflux filter categories | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://reader.miniflux.app/categories | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=miniflux.app | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
document.querySelectorAll('article.item').forEach(function(e) { | |
let nbEntries = parseInt(e.querySelector('span[title="Number of unread entries"]').innerText); | |
if (nbEntries == 0) { | |
e.remove(); | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment