5 in 5 Project #1: Naturify Chrome Extension

image

What words need changing? While stewing on this phrase, I thought of how saturated the media is nowadays — barrage after barrage of words intended to affect the reader in some way, positive or negative. Could someone turn off all the noise?

image

Web browsers are applications people use to peruse the Internet, an obvious gateway for massive amounts of content to reach the reader. I decided to make a Chrome browser extension that replaced all characters on a website with plant emojis.


Precedents

image

A quick Google search indicates that the “find-and-replace” extension has been done before. “Caaaaarbs” is an extension that finds common carb words (such as pasta, bread, etc) and replaces it with the word “caaaarbs”.


Process

I’ve never made a browser extension before, so it was fun learning about it. I learned that the basic file structure for writing an extension includes the manifest.json and a JavaScript file.

I wrote a simple function that would randomly select a nature emoji from an array and replace a character on the page with it.

function randomEmoji() {

var v = ["🌲", "🌵", "🌳", "🌴", "🌱 ", "🌿", "🍃", "🍂", "🍁", "🍄", "🌾 ", "💐", "🌷", "🌹"];

return v[Math.floor(Math.random() * (v.length -1))];

}

Final

image

After installing the extension in Chrome, voila! All the characters on any given webpage has been replaced with nature emojis.