npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

block-facebook

v1.0.10

Published

Keep Facebook from tracking your data.

Downloads

6

Readme

Block Facebook

A utility that applies the method described in this Quartz article, to keep Facebook from tracking your data.

This program is intended to block all sites that Facebook uses for data tracking, including facebook.com, instagram.com and whatsapp.com. The cost of doing this is that you will be unable to access these sites, as well as all the other sites included on the block list, on the machine that has installed this program.

You can try it out for a while, and if you change your mind, follow the instructions in the Reverse Process section. Personally, I don't really use any of the Facebook social media offerings on my computer, so losing access to them isn't a big deal.

Compatibility

  • Tested on MacOS.
  • Not yet tested on Linux, but theoretically it should work, because the filesystem and commands are the same in the context of this program.
  • Does not work on Windows.
  • Note that this program accesses the /etc/hosts file, which is a root file. You will need the following:
    • Administrator and/or sudo access on your machine.
    • Vim editor (this is usually already preinstalled in MacOS and Linux).

Install and Run

At any point, if prompted to enter password, enter the password you use to log in to your account on your computer.

Using npm

$ npm i block-facebook
$ cd ./node_modules/block-facebook
$ node index.js

Using git clone

$ git clone https://github.com/elainechan/block-facebook.git
$ cd block-facebook
$ sudo sh block-facebook.sh

Reverse Process

If you change your mind about blocking Facebook, use the Vim text editor to remove the domains that had been added to /etc/hosts:

  • Type the following in a shell.
$ sudo vim /etc/hosts
  • If prompted for a password, enter the password you use to log in to your user account on your computer.
  • Use the arrow keys to navigate to the line that says 0.0.0.0 apps.facebook.com.
  • Press the esc key to ensure you're in the right mode.
  • Type dG to delete all the domains added by block-facebook.
  • Type :wq to save and quit.
  • Done.

How block-facebook Works

When you run the block-facebook.sh script, it opens the /etc/hosts file in your root directory, inserts all the domains from the block list, and assigns 0.0.0.0 to those domains.

0.0.0.0 is intended to set the IP address as null or empty. When your computer then tries to connect to one of the domains assigned this empty IP address, it won't be able to establish a connection. Since a connection cannot be established, you will not be able to access that site, and Facebook will not be able to access your data.

You can learn more about the meaning of the 0.0.0.0 IP address from this Stack Overflow question.

To learn more about /etc/hosts, see this Ask Ubuntu question.