Inspiration
Traveling is difficult during the COVID pandemic. Rather than forgetting to search or ignoring COVID data about a traveler’s destination, we want to provide a sure-fire way that they will acknowledge the risk of traveling to the location before they search for travel accommodations. This would potentially lower the amount of unnecessary travelers, which could lower the number of COVID infections as well as help the user save money by not traveling to COVID-hotspots.
What it does
When a potential traveler searches a destination on a travel website, this Chrome extension will alert them of information about COVID in the location they searched. Currently, it supports airbnb.com and provides information about the US states that is updated on a daily basis, such as daily increases in coronavirus cases and deaths.
How we built it
We used JavaScript to create the extension and incorporated “The COVID Tracking Project” API for the data.
Challenges we ran into
It was challenging to incorporate the extension into the site of our choice, Airbnb, because the UI would hide the search bar after a search and would not reload the site each time a new search was implemented. However, by watching the URL change with each search, we were able to notice when a search was done and grab the elements necessary to set up the next alert.
We also had some trouble because we got the API link wrong. This was unfortunate, but gave us many opportunities to learn more about debugging a chrome extension, both through console logging and error message analyzing.
Accomplishments that we're proud of
We were proud of creating a usable extension that is easily accessible for users to check that their travel destinations are handling the COVID outbreak well. Another accomplishment in this project is its ability to scan specific parts of the website when the search button is pressed so that it can provide the user with relevant information about their destination.
What we learned
From this hackathon, we learned that call-backs are often necessary to ensure that an async method completes when called before proceeding. The timing of a website content update was another part of this extension that was particularly interesting. For example, when the HTML of a page is modified, it takes the website a certain amount of time to reload. While this delay is not noticeable by humans, it can sometimes prevent the alert from displaying.
What's next for Trip Buddy
We would like to bring Trip Buddy to other travel websites as well as provide data on a global scale. We hope to provide more COVID information as customizable options to the traveler, and rather than using an alert, we would like to implement our own popup to appear to the traveler with a friendly UI. Additionally, we plan to implement an optional feature that will alert the user if their own location is a COVID-hotspot, remind them of safety precautions, and urge them not to travel.
Built With
- javascript
- the-covid-tracking-project
Log in or sign up for Devpost to join the conversation.