rNeomy / reader-view

Access Firefox's built in reader view from right click context menu
https://webextension.org/listing/chrome-reader-view.html
Mozilla Public License 2.0
472 stars 75 forks source link

An option to open in a new tab #89

Open ghost opened 4 years ago

ghost commented 4 years ago

Some websites are not loading the whole text immediately. For example, Quora shows a "more" button. Which sometimes requires navigating back and reopening the reader mode. But because it's happening in the same tab, the previous web page has unloaded and has to be loaded again, which sometimes might take a few seconds. Opening in a new tab would allow to switch more quickly between the reader mode and the web page.

rNeomy commented 3 years ago

I don't see how efficiently have this feature. The reader library needs a loaded document to parse the content and if we want to load the document in a new tab, we need to first load the normal document and then switch to the reader view when the document is fully loaded which is going to take longer. See how the "Open in Reader View" context menu over links work.

ghost commented 3 years ago

A possible idea: Cloning the #document, passing it to Readability, and when it returns the result, creating a shadowRoot / iframe element with zIndexes set to maximum, which overlays the default content. When switching back to the standard mode, setting display:none on the shadowRoot element. Then it wouldn't be necessary to open a new tab, because switching would be instant.

rNeomy commented 3 years ago

which overlays the default content.

This is going to reduce performance. To prevent advertising and tracking scripts from being active, this extension replaces the entire document.

Lordpreciousstone commented 2 years ago

[1]The elder unto the elect lady and her children, whom I love in the truth; and not I only, but also all they that have known the truth; [2]For the truth's sake, which dwelleth in us, and shall be with us for ever. [3]Grace be with you, mercy, and peace, from God the Father, and from the Lord Jesus Christ, the Son of the Father, in truth and love. [4]I rejoiced greatly that I found of thy children walking in truth, as we have received a commandment from the Father. [5]And now I beseech thee, lady, not as though I wrote a new commandment unto thee, but that which we had from the beginning, that we love one another. [6]And this is love, that we walk after his commandments. This is the commandment, That, as ye have heard from the beginning, ye should walk in it. [7]For many deceivers are entered into the world, who confess not that Jesus Christ is come in the flesh. This is a deceiver and an antichrist. [8]Look to yourselves, that we lose not those things which we have wrought, but that we receive a full reward. [9]Whosoever transgresseth, and abideth not in the doctrine of Christ, hath not God. He that abideth in the doctrine of Christ, he hath both the Father and the Son. [10]If there come any unto you, and bring not this doctrine, receive him not into your house, neither bid him God speed: 2 John:1:1-10

Lordpreciousstone commented 2 years ago

[1]The elder unto the elect lady and her children, whom I love in the truth; and not I only, but also all they that have known the truth; [2]For the truth's sake, which dwelleth in us, and shall be with us for ever. [3]Grace be with you, mercy, and peace, from God the Father, and from the Lord Jesus Christ, the Son of the Father, in truth and love. [4]I rejoiced greatly that I found of thy children walking in truth, as we have received a commandment from the Father. [5]And now I beseech thee, lady, not as though I wrote a new commandment unto thee, but that which we had from the beginning, that we love one another. [6]And this is love, that we walk after his commandments. This is the commandment, That, as ![Uploading GridArt_20220416_175408507.jpg…]()