Optimize website to show reader view in Firefox

前端 未结 2 2052
死守一世寂寞
死守一世寂寞 2020-12-04 18:34

Firefox 38.0.5 added a \"Reader View\" to the address bar:

\"enter

But not all

2条回答
  •  时光取名叫无心
    2020-12-04 19:01

    You have to add

    or

    tags to achieve a page to iniciate the ReaderView.

    I created a simple html that works:

    
    Reader View shows only the browser in reader view
    
    
    Everything outside the main div tag vanishes in Reader View

    H1 tags outside ot a p tag are hidden in reader view

    123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 123456789 123456

    This is the minimum needed to activate it. This is a somewhat multi-faceted process where scores are added for text chunks.

    You can for example activate the reader view in forum's software if you add a

    -tag around each message block in the view-posts template.

    Here are some more details about the mechanism

提交回复
热议问题