This userscript is created for mobile browsers, and tries to fit all text on page to the screen width after pinch gesture.
It tries to replicate text reflow feature from Opera Mobile, but in any browser.
Since it is a first attempt of implementing this, there are a few problems:
1) Some reflowed text elements might be misaligned, if they are positioned inside an element with align-items:center
2) The script attempts to guess text element which you were zooming into, and scrolls it into view after reflow. But this feature is currently buggy and doesn't work reliably all the time
3) Some elements with text are not reflowed by the script, for example div
elements, or span
elements with display:inline
set. I am yet to figure out how to target these elements without too much performance overhead and unwanted reflows