Hi to all,
as requested some weeks ago, here is a plugin that deletes from the xhtml all classes and ids that are not referenced anywhere in the stylesheets (nor in fragment identifiers in href attributes, in the case of ids).
There is a graphical interface that lets the user choose what they want to remove and what they want to keep.
I tried to adjust the colors of backgrounds and texts to keep it all readable and not too ugly in the various dark modes, but I couldn't test the plugin on a Mac (and I know Tcl/Tk and Mac don't always get along very well...).
The parser css used by the plugin is css_parser/cssutils, the parser xhtml is gumbo (adapter for sigil_bs4), all provided by Sigil installers.
For now I tested the plugin with Sigil 1.2 and 1.3 on Linux Mint, Manjaro, Win7 and Win10.
I upload the first version of the plugin as a beta (needs some more testing), let me know if you encounter any problems, thanks!
The license of the plugin is the GPL v3 or any later version.
as requested some weeks ago, here is a plugin that deletes from the xhtml all classes and ids that are not referenced anywhere in the stylesheets (nor in fragment identifiers in href attributes, in the case of ids).
There is a graphical interface that lets the user choose what they want to remove and what they want to keep.
I tried to adjust the colors of backgrounds and texts to keep it all readable and not too ugly in the various dark modes, but I couldn't test the plugin on a Mac (and I know Tcl/Tk and Mac don't always get along very well...).
The parser css used by the plugin is css_parser/cssutils, the parser xhtml is gumbo (adapter for sigil_bs4), all provided by Sigil installers.
For now I tested the plugin with Sigil 1.2 and 1.3 on Linux Mint, Manjaro, Win7 and Win10.
I upload the first version of the plugin as a beta (needs some more testing), let me know if you encounter any problems, thanks!
The license of the plugin is the GPL v3 or any later version.






