Works as advertised and serves a much needed function in TB. I'd been looking for some code that would do this and save me some steps.
I realize that it apparently does not work well if there are very large numbers of messages that need to be deleted (see low rating reviews), but if you keep up with the accumulating junk and delete it regularly (not hard or time consuming), the code works just fine.
It works but not as I expected : il you check in your Thunderbird mail folders and files the size of the file named "Junk" you should probably note that it still weights tons, even after having "deleted" your junk folder with this extension. I removed it