Chromium browser extension that censors random words and images.
Chromium browser extension that censors random words and images.
I built a chromium browser extension that censors random parts of text and places random black rectangles over images. Through this project, I learned how to work with TreeWalkers.
Wrote README. Added image censoring (random black rectangles), better text censoring, implemented Mutation observer that handles dynamically loaded content, modified the popup and created the .crx extension file.
Log in to leave a comment
The extension can now do actual text censoring. It uses a TreeWalker to find all the text nodes and regex to split the text into words. Then the extension chooses two numbers. Number of censored words in the sentence and offset of the first censored word in the sentence. The selected words are then simply surrounded with a span element that has a black background.
Log in to leave a comment
Created the basic setup (manifest.json, icons, basic popup, all the .js files, etc.)
Log in to leave a comment