Skip to content

Instantly share code, notes, and snippets.

@jdecool
Created May 4, 2022 20:03
Show Gist options
  • Save jdecool/10e918f765cb442f63a5fbe7f740ca21 to your computer and use it in GitHub Desktop.
Save jdecool/10e918f765cb442f63a5fbe7f740ca21 to your computer and use it in GitHub Desktop.
Tampermonkey - Miniflux - Filter empty categories
// ==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