No problem. I assume (based on probability) that my changes might have an impact somewhere else in the code.
I did not have time to read the entire code-base (and I'm not sure I would have understood it all on the first read anyway
).
I tried my best to keep with your established coding conventions and flow and not do a "hack job."
Based on my testing it works and doesn't seem to cause any instabilities/problems either within those code branches or the large script as a whole. Based on what I observe the script doing I don't think these changes will have negative impact.
However, there is a possibility with your wildcard changes there might be issues.
But, in the end all these changes are doing is allowing a user to add or remove more than one domain at a time, but the end result is the same whether they run this patch or they choose to "add" or "delete" multiple times manually.
Of course, I would love for you to review it and give it a seal of approval at least for those others wanting to try it and hopefully incorporate my changes (or at least replicate the functionality) into a future release.
This was a good exercise for me as I haven't done any shell coding in close to 2 years, so it was nice to at least try solve a problem.
And - of course - thanks for all your work and the new release!
Oh - might I just add that I think the biggest benefit to these functions is for testing. When you are trying to figure out what domains to whitelist for a problem, etc. I had another crazy idea while I was finishing up the edits to have a "capture" function. It would be similar to the log file tailing, but additionally it would pull out every domain it shows blocked over the time it was run then present them in a list for the user to confirm import. This way you could run this option, go to your blocked site, then stop the option and import all the blocked sites. You could then try whittling down to only the bare essentials.