简体   繁体   中英

Is it possible to detect Safari Reader display with Javascript?

If you have multiple <article> s on a page, Safari Reader will only display the first one. I am writing a long doc; separating the chapters with <article> seems semantically correct. I like giving my mobile web users the ability to keep scrolling and reading forever, so I don't really want to put each <article> on a different webpage. But then again, I don't want users who like Safari reader to only be able to read Chapter 1.

If there were a way to detect Safari reader display, perhaps I could display chapter links in the DOM just when Safari Reader is open.

Any ideas?

Gosh, I really wish Safari reader would horizontal-swipe between articles on the same webpage.

I believe that it is not possible as Safari Reader mode acts like an extension. And if even it would be possible to detect, I am not sure that adding links or other DOM elements would affect the content of Reader as it is being generated when page loads.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM