Giter Site home page Giter Site logo

roy-orbison / hide-comments-everywhere Goto Github PK

View Code? Open in Web Editor NEW

This project forked from grantwinney/hide-comments-everywhere

0.0 0.0 0.0 866 KB

A browser extension for hiding major commenting systems like Disqus, Livefyre, Facebook plugin, WordPress, YouTube, etc.

License: MIT License

JavaScript 56.07% CSS 15.89% HTML 28.04%

hide-comments-everywhere's Introduction

Hide Comments Everywhere

Fed up with the vitriol left in comments, many sites are dumping their comment systems completely. It's just too costly to monitor them, so they tend to devolve into a cess pool. Personally, I just want the content most of the time. YouTube anyone?

To help with my own sanity (and maybe yours?), I wrote an extension that hides many comment systems - identifying them is somewhat predictable. It's available for Chrome and Firefox, or you can read more about it here too.

What does this hide?

A lot, including but not limited to:

  • Facebook comment plugin
  • Disqus
  • Livefyre
  • WordPress
  • Reddit
  • YouTube
  • Facebook
  • Twitter
  • Any other comment system where someone happened to assign the ID or class "comments" or "respond". Hopefully this doesn't hide anything unexpected, like some site that assigned the "comments" ID to the main content of their posts... please let me know if it does.

How does it work?

This extension checks whether comments should be disabled for the current URL, and is triggered when the page is first loaded or the URL changes (i.e. you click a link).

  1. First, it checks the sites.json file for known DOM elements that contain comments on the current URL.
  2. Then it sees if you've chosen to exclude the current URL (the whitelist on the Options page under Filters).
  3. It injects a CSS stylesheet into the page that sets display style to "none" for comments (and anything related, like comment counters).

The allowed (whitelisted) sites are ones you define on the Options page. Specify a list of URLs as regex patterns, one per line, that should display comments all the time (the extension is effectively disabled for those URLs). Your list of allowed sites uses synchronized storage, so it should be available on any machine you've installed the extension on and are logged into.

  • You can quickly add the URL of the current page by opening the extension popup (click the icon in the toolbar), and then selecting a URL (or entering a custom one) and pressing the "Allow" button. Note that, unlike the "options" page, these URLs are entered normally and not as regular expressions.
  • Note: There's also a hard-coded whitelist, although I don't anticipate adding very many sites to it. One I added is GitHub, for which it's unlikely anyone would want to hide comments. There are issues with their DOM that cause legit sections of the site to be hidden.

Click on the icon in the toolbar and press the large "toggle" button to temporarily toggle enabling/disabling the extension for a single tab, in order to hide or display comments. Click it again to toggle it back. Reloading the page will cause it to follow the same rules as above, looking first at blocked sites and then your personal allowed sites.

Permissions

You'll be notified that it can "read and change all your data on the websites you visit" because that's how it works - it hides certain comment-related elements on the page so you don't see them.

It also uses storage to save its state, but it shouldn't prompt you for that.

I need your help!

If you notice a commenting system that should be added (blocked), open an issue for that. Include the website where you noticed it, or create a pull request with the necessary changes to the "sites.json" file, and I'll follow-up as time permits.

Thanks!

Need help? Have a request?

Open a new issue with as many details as possible. The more you let me know upfront, the less I'll have to ask later!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.