Firefox阅读器如何查看操作 [英] How does Firefox reader view operate

查看:108
本文介绍了Firefox阅读器如何查看操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

总结


我正在寻找可以创建网页的标准,如果用户需要的话,请确保它会出现在 Firefox阅读器
查看
中。
>有些网站有这个选项,有些则没有。一些文本更多的文本没有这个选项比其他文本少得多。
实例的堆栈溢出在Reader
View中只显示问题而不是任何答案。

问题

我已经将Firefox从38.0.1升级到38.0.5,并且发现了一个名为ReaderView的新功能,删除页面混乱,使文本更容易阅读的叠加。
Readerview在地址栏的右侧作为某些页面上的可点击图标。

这很好,但是从编程的角度来看我想知道阅读器视图是如何工作的,它适用于哪些页面的标准。我已经做了一些Mozilla Firefox网站的探索,没有明确的答案(我找到了任何类型的编程答案),我当然谷歌/ Binged这只有回来引用Firefox插件 - 这不是一个插件而是新版Firefox版本的主要部分。

我假定readerview使用了HTML5,并且会提取< article> 内容,但事实并非如此因为它在维基百科上似乎没有使用< article> 或类似的HTML5标签,而是readview提取某些< div> s并单独显示它们。此功能适用于某些HTML5页面,如维基百科,但不包括其他人。



如果任何人有任何想法如何使用Firefox ReaderView实际操作以及如何使用此操作网站开发人员,你可以分享?或者如果你能找到这个信息可以找到的地方,你能指出我的方向 - 因为我还没有找到这个。

解决方案

您至少需要一个< p> 标签,您希望在Reader视图中看到以及至少有516个字符文本。



例如这会触发ReaderView:

 < ;主体> 
< p>
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
123456789 123456
将/ p为H.
< / body>

请参阅 https://stackoverflow.com/a/30750212/1069083


Summary

I am looking for the criteria by which I can create a webpage and be [fairly] sure it will appear in the Firefox Reader View, if user desired.

Some sites have this option, some do not. Some with more text do not have this option than others with much less text. Stack Overflow for instance displays only the question rather than any answers in Reader View.

Question

I have had my Firefox upgraded from 38.0.1 to 38.0.5 and have found a new feature called ReaderView - which is a sort of overlay which removes "page clutter" and makes text easier to read. Readerview is found in the right hand side of the address bar as a clickable icon on certain pages.

This is fine, but from the programming point of view I want to know how "reader view" works, which criteria of which pages it applies to. I have done some exploration of the Mozilla Firefox website with no clear answers (sod all programming answers of any sort I found), I have of course Googled / Binged this and this only came back with references to Firefox addons - this is not an addon but a staple part of the new Firefox version.

I made an assumption that readerview used HTML5 and would extract <article> contents but this is not the case as it works on Wikipedia which does not appear to use <article> or similar HTML5 tags, instead the readview extracts certain <div>s and displays them alone. This feature works on some HTML5 pages - such as wikipedia - but then not others.

If anyone has any ideas how Firefox ReaderView actually operates and how this operation can be used by website developers, can you share? Or if you can find where this information can be located, can you point me in the right direction - as I have not been able to find this.

解决方案

You need at least one <p> tag around the text, you want to see in Reader View and at least 516 characters in 7 words inside the text.

for example this will trigger the ReaderView:

<body>
<p>
 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
 123456789 123456
</p>
</body>

See my example at https://stackoverflow.com/a/30750212/1069083

这篇关于Firefox阅读器如何查看操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆