On Wikipedia, many(?) pages wrap chemical formulas with a class chemf. That would be an easy target to add to the extension.
A much more useful approach would be to look for sub and sup and check what is before them. If is a chemical element, then include it. It probably should be expanded to the left/right to pickup a sequence that can be a chemical equitation (include "+", "=", and "arrows" along with parens and brackets). This will get a large number but there are still more things to try such as separating strings to see if the entire string matches a sequence (iterate over the string and if the entire sequence are chemical elements, it matches). For example, the final equation on this page contains the sequences AsF and ClO:
<dd>2 AsF<sub>5</sub> + Cl<sub>2</sub>O<sub>6</sub> → 2 ClO<sub>3</sub>AsF<sub>5</sub></dd>