Here’s my solution for hiding select part of the UI when a filter is match. As always, do lots of backups and use this at your own risks.
Edit : Warning, custom sidebar tab will be deleted if you use the reset button, I’ll make a fix tomorrow !
https://read-only.tiddlyhost.com/#%24%3A%2FTiddlyTweaks%2FReadOnly
ReadOnly.json (8.9 KB)
Example of read only vs edit mode :
Limitations
- The UI doesnt instantaneously update, it needs to be refreshed with the “save changes” button. Since you need to be logged in to be able to save on tiddlyhost, this mean that you will need to install this in a local wiki to test it out, sorry …
- Buttons are not restored when disabling the “read” mode. This is not a big issue since the read mode is meant to be triggered for readers and thus the changes cant be saved, but can still be problematic if the wiki is meant to be downloaded then edited by the reader. For now this is fixed by using a “reset” button.
Any help to fix the limitations above / improve the code is welcomed !