Hey guys -
I could then pull up the command palette, choose "Remove Link and Script Types," and the associated regular expression will instantly be run on the contents of the focused page.
...Or maybe to remove all HTML comments from the page:
'Remove HTML Comments': /<!--\s\S]+?-->/g
It would be even neater if there was a way to stack these. So, in addition to single commands, I could also execute a series of them with a single command: first use this regular expression to remove comments, then make the first letter of all words in h1 tags capital, etc.
"Optimize HTML": [replacement1, replacement1, replacement1]
The regex references in the array would then be executed sequentially on the document.
Personally, I'd have a lot of uses for something like this, but I'm not sure if anyone else would. Let me know, and, if so, we may hire @weslly to make it.