Greasy Fork is available in English.

Text reflow on zoom for mobile (text wrap)

Fits all text to the screen width after a pinch gesture on phone

Forfatter
emvaized
Daglige installasjoner
0
Totale installasjoner
24
Vurderinger
0 0 0
Versjon
1.0.7
Lagd
30.10.2024
Oppdatert
17.12.2024
Size
6,2 kB
Lisens
MIT
Gjelder
Alle sider

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 wrap from Opera Mobile, but in any browser.

For changelog see the Github page

Demo:

Possible issues

Since it is my first attempt of implementing this feature, there might be some problems:

  • Some reflowed text elements might be misaligned, if they are positioned inside an element with align-items:center

  • The script attempts to guess text element which you were zooming into, and scrolls it into view after reflow. But this feature is buggy and doesn't work reliably all the time

  • 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

If you have any ideas on how the script can be improved, please let me know using a Feedback form or on the Github page!