Previously, MMV handled thumbnail detection/exclusions on the client side (since no ui changes happened until the user actually clicked on an image).
Now that we want a carousel element to appear at the top of applicable pages before JS initializes, we need to port the this logic from JS to PHP
Requirements
- The existing JS logic is re-implemented in PHP
- Any additional exclusions we handled in the ImageBrowsing prototype are also handled
- Excluded selectors could be exposed as a config var that the community could extend/override as need
- Ideally this logic would be used by both the desktop viewer as well as the new one that we are building (both should refer to the same config variable at least)
- We should refer to the cached parser output for performance reasons