如何在网页中禁用Safari阅读器 [英] How to disable Safari Reader in a web page
问题描述
我很想知道更多关于什么会触发Safari中的Reader选项,哪些不会。我不打算实施任何可以禁用它的东西,但作为技术练习很好奇。
这是我迄今为止学到的一些基本玩法:
- 您至少需要一个 H 标签 可能会寻找句子中断'。'和其他标准
如果使用 H 标签,Safari将提供'Reader'以及以下内容: 如果您从上述任何一项中减去1个字符,则'Reader'选项不可用。 I应该注意到, H 标签的字符数量起到了一部分作用,但是当我确定结果ab时,可悲的是没有意识到这一点OVE。假设有20个以上的字符供 H 标签使用,并在上述结果中修复。 其他有趣的事情: 如果有人能完全确定这一点,我会很感兴趣。 您至少需要一个 您也可以阅读 关于启用Safari阅读器的博客文章 ,以获取关于此主题的所有发现。 I'm curious to know more about what triggers the Reader option in Safari and what does not. I wouldn't plan to implement anything that would disable it, but curious as a technical exercise. Here is what I've learned so far with some basic playing around: Safari will provide the 'Reader' if, with a H tag, and the following: If you subtract 1 character from any of the above, the 'Reader' option is not available. I should note that the character count of the H tag plays a part but sadly did not realize this when I determined the results above. Assume 20+ characters for H tag and fixed throughout the results above. Some other interesting things: I'd be interested if anyone can determine this in full. "You need at least one My answer on the other Safari Reader question provides some more info. You could also read my blog post on enabling Safari Reader for all my findings on the subject. 这篇关于如何在网页中禁用Safari阅读器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
< p style =display:none;>
将它们从计数中删除
显示
为 none
,然后显示他们在230ms以后用Javascript避免了阅读器选项
< h *>
元素 - this根本不正确。下面是一个例子: http://mathiasbynens.be/demo/safari-reader-test- 3
<p style="display:none;">
for P tags removes them from the countdisplay
to none
, and then showing them 230ms later with Javascript avoided the Reader option too<h*>
element" — this is simply incorrect. Here’s an example: http://mathiasbynens.be/demo/safari-reader-test-3