Text reflow on zoom by pinch gesture (mobile)

This userscript tries to fit text to screen width after pinch gesture. It tries to replicate text reflow feature from Opera Mobile.

2024/10/31のページです。最新版はこちら。

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
作者
emvaized
評価
0 0 0
バージョン
1.0.0
作成日
2024/10/30
更新日
2024/10/31
大きさ
4.81KB
ライセンス
MIT
対象サイト
すべてのサイト

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.

Illustration:


Since it is a first attempt of implementing this feature, there are currently a few 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 it can be improved, please let me know using a Feedback form!