To run this project right now:

Go to chrome://extensions in your Google Chrome browser.

Turn on Developer Mode using the button on the top right.

Click on "Load Unpacked" and then select the directory for the files provided.

Enable the extension and you should be good to go!

This project hasn't been published in the Chrome Web Store yet.


Mental health is just as important physical health. And it is something that can be impacted by things you see, hear, glance, or are even reminded about. Every single day, we see posts on Facebook where people have commented underneath to ask the poster to add trigger or content warnings. This project helps people take care of their mental health by giving them an option to not see posts that might be unhealthy for their state of mind.

What it does

content warning asks the each user for custom keywords they find triggering or upsetting and hides any posts on their feed that contain those keywords. Instead, the person is given a small label that informs them that a post has been hidden. It provides a whole new experience, free of anxiety and worry about coming across sensitive subjects and significantly helps improve or maintain their state of mind while scrolling through a feed.

How we built it

We built it using HTML, CSS, and JavaScript through a free Google Chrome Extension that people can download on their own computers in the near future. We made a simple form that asks them for potentially triggering subjects and if they feel better about them, gave them an option to remove their keywords. We stored each user's personal keywords locally in their Google Chrome account so they can have it wherever they access Facebook through Chrome.

Challenges we ran into

The three challenges we ran into were:

  1. Finding selectors for Facebook posts. Facebook's HTML is long and complicated so it was difficult to identify the most effective elements in the DOM to check for keywords.
  2. Having the function run for each change in the DOM. It was difficult to have the function run every single time anything new appeared in the person's newsfeed and it took a while for us to figure it out. At the end, we simply used a MutationObserver that watches out for any and all changes to an element.
  3. Storage. We had to find local storage on each person's computer that would save their custom keywords so that they wouldn't have to re-enter them each time they used Facebook. Luckily, we found a way to do that through Google Chrome's storage sync services.

Accomplishments that we're proud of

The one thing we're most proud of is creating something that may be helpful to the world and to people's mental health. It is not perfect and has a long way to go but it is a simple tool that may make at least one person's day a little better.

What we learned

We learned the value of collaborating in a team, innovating with new tools, and being flexible with your plans because you don't know what obstacles you may face while working on a project like this.

What's next for content warning

First, we want to get into the Google Web Store for people to download for free.
Then, we want people to have the option of displaying the posts even if they contain their keywords after they have been given a warning.
We also want to bring some machine learning into the project by scanning pictures for common topics that people find triggering or upsetting.
We want to add more languages, involve more people, talk to real mental health experts to get their opinion, really get it out there because it can prove to be a helpful tool.

Share this project: