Hide done from page conditionally

It targets page body and linked refs and journal pages as explained in the Design Notes. It doesn’t target everywhere. For example, if your page has embedded queries it won’t target them. This is because the plugin is capable of matching against actual block content and not simply the DOM itself. But this advantage has drawbacks in some use cases.

I explained in the Design Notes that the core doesn’t provide any rendering hooks. If it did it could easily handle the matching in a way superior to what css selectors can do, but until the requested feature is added there are limitations.

To better solve the toggle to-do visibility use case, I wrote another plugin. It more closely follows the suggestion @danzu made. It’s based purely on stylesheet rules. It does not query the database at all. It keep tabs on the DOM as rendered.

It’s available in the plugin marketplace. Unfortunately, due to cross-frame origin policies one of the minor features doesn’t work when installed via the marketplace. So install it manually as directed on the plugin home page and everything will work fine.

1 Like