reader-view | Access Firefox 's built in reader view | Addon library

 by   rNeomy JavaScript Version: Current License: MPL-2.0

kandi X-RAY | reader-view Summary

kandi X-RAY | reader-view Summary

reader-view is a JavaScript library typically used in Plugin, Addon applications. reader-view has no bugs, it has no vulnerabilities, it has a Weak Copyleft License and it has low support. You can download it from GitHub.

Strips away clutter like buttons, background images, and changes the page's text size, contrast, and layout for better readability.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              reader-view has a low active ecosystem.
              It has 373 star(s) with 66 fork(s). There are 13 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 82 open issues and 73 have been closed. On average issues are closed in 53 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of reader-view is current.

            kandi-Quality Quality

              reader-view has 0 bugs and 0 code smells.

            kandi-Security Security

              reader-view has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              reader-view code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              reader-view is licensed under the MPL-2.0 License. This license is Weak Copyleft.
              Weak Copyleft licenses have some restrictions, but you can use them in commercial projects.

            kandi-Reuse Reuse

              reader-view releases are not available. You will need to build from source code and install.
              reader-view saves you 1034 person hours of effort in developing the same functionality from scratch.
              It has 2346 lines of code, 0 functions and 54 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of reader-view
            Get all kandi verified functions for this library.

            reader-view Key Features

            No Key Features are available at this moment for reader-view.

            reader-view Examples and Code Snippets

            No Code Snippets are available at this moment for reader-view.

            Community Discussions

            QUESTION

            Why does SO HTML structure break browser "reader modes"?
            Asked 2020-Sep-19 at 14:38
            Background

            Browser "reader mode" reformats web pages to make them more accessible/readble according to individual users' needs (spacing, contrast, font, etc).

            While every browser implements reader mode differently, in general, they all nail article-style sites, like Medium, New York Times, Lifehacker, etc.

            Problem / Question

            But on StackOverflow, reader modes almost all break in various ways, displaying often only the question and/or first answer; the other content is simply missing.

            What, specifically, about the HTML structure of SO/SE pages confuses browser reader modes?

            Put another way, how could the HTML structure of the page be changed to allow browser reader mode to correctly parse and display all the question/answer content?

            Progress so far

            From comparing various browsers,* mobile and desktop, it seems that there is some kind of simple heuristic that reader mode uses to determine what content to display, like, "show only the element with the most text, and hide all other content." Or, "show only the element with the most text, but weighted toward elements closer to the top of the page."

            *Tried so far (mobile and desktop): Firefox, Safari, and Chrome (note that Chrome only has this natively on mobile, and calls it "simplified view"). Access to reader mode on Firefox and Safari is in the URL bar; access in Chrome is at the bottom of the screen, when supported.

            But it's also possible that there is some scanning of element tags/classes/ids looking for a semantic indication of what the important content is.

            From poking around in browser DevTools, I've noticed that there appear to be two wrapper

            s that contain all the Q&A content, while the individual question and answers all also get their own . This baffles me, because often it's the first question and first answer that get displayed, while I would expect one or the other -- or for the reader to detect the wrapper and display all the content.

            While all browsers implement this differently, since they can all handle article-style sites with no problem, cutting out non-content elements, I'm looking for a tweak to the structure or semantics of SO/SE pages that would similarly induce browser reader modes to capture all the content.

            Accessibility

            SE recently widened its line spacing across all SE/SO sites to promote accessibility (e.g. for readers with dyslexia). My question here is the technical sister-question to my post on meta, in which I suggest that SE sites better support reader views.(Note that I am not for or against the formatting change; I'm just interested in investigating a way to support user-determined formatting through reader modes.) I'm hoping that this question will serve as the technical-investigation corollary to that post, and will yield some actionable information about what modifications could be made to support browser reader modes.

            ...

            ANSWER

            Answered 2020-Sep-02 at 20:05

            Here is the source code for reader view for FireFox, we can use this to make some best guesses as to why Stack Overflow doesn't quite work. I would imagine similar criteria is used for other reader view implementations.

            Criteria used by reader view that conflict with Stack Overflow

            A few thing jump out as to why Stack Overflow doesn't work with a reader view.

            It uses criteria designed to remove comments from a page.

            There are a few criteria such as length of text (300+ characters for max points as likely candidate), use of commas and class names all designed to remove nodes that look like comments.

            As reader mode is designed to read blog posts this is obviously favourable, but on Stack Overflow this is likely to remove large sections of the page as candidates as they have lots of low scoring nodes (I mean....who uses commas in comments anyway? They use valuable characters of your character count! hehe).

            Reader View doesn't use semantics as an indicator

            This one surprised me, but it doesn't look for semantic elements such as ,

            etc. when making decisions.

            This wouldn't help Stack Overflow as it stands as they don't use them either but it would have been my immediate thought on how to fix this.

            Class names don't help Stack Overflow

            However they do look for class names that indicate whether an item is likely to be relevant.

            Negative classes (which I believe include partial matches such as "main-comments" for "comment") are as follows (which are likely to result in a node being removed from the likely candidates list):-

            Source https://stackoverflow.com/questions/63707338

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install reader-view

            You can download it from GitHub.

            Support

            Homepage: https://add0n.com/chrome-reader-view.htmlChrome: https://chrome.google.com/webstore/detail/reader-view/ecabifbgmdmgdllomnfinbmaellmclnhFirefox: https://addons.mozilla.org/en-US/firefox/addon/readability-based-reader-view/Opera: https://addons.opera.com/en/extensions/details/reader-view-2/Edge: https://microsoftedge.microsoft.com/addons/detail/reader-view/lpmbefndcmjoaepdpgmoonafikcalmnf
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/rNeomy/reader-view.git

          • CLI

            gh repo clone rNeomy/reader-view

          • sshUrl

            git@github.com:rNeomy/reader-view.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Addon Libraries

            anki

            by ankitects

            ember-cli

            by ember-cli

            trojan

            by Jrohy

            data

            by emberjs

            Try Top Libraries by rNeomy

            auto-tab-discard

            by rNeomyJavaScript

            proxy-switcher

            by rNeomyJavaScript

            tab-suspender

            by rNeomyJavaScript

            clean-uninstall

            by rNeomyJavaScript

            javascript-toggle-on-and-off

            by rNeomyJavaScript