diff --git a/Abusive Word Hider/Output SS/1. Before enabling Extension.jpg b/Abusive Word Hider/Output SS/1. Before enabling Extension.jpg new file mode 100644 index 00000000..3a24867d Binary files /dev/null and b/Abusive Word Hider/Output SS/1. Before enabling Extension.jpg differ diff --git a/Abusive Word Hider/Output SS/1.1.png b/Abusive Word Hider/Output SS/1.1.png new file mode 100644 index 00000000..d7973c53 Binary files /dev/null and b/Abusive Word Hider/Output SS/1.1.png differ diff --git a/Abusive Word Hider/Output SS/2. Enabling the extension.png b/Abusive Word Hider/Output SS/2. Enabling the extension.png new file mode 100644 index 00000000..8fae24ac Binary files /dev/null and b/Abusive Word Hider/Output SS/2. Enabling the extension.png differ diff --git a/Abusive Word Hider/Output SS/3. After enabling extension.jpg b/Abusive Word Hider/Output SS/3. After enabling extension.jpg new file mode 100644 index 00000000..c6642580 Binary files /dev/null and b/Abusive Word Hider/Output SS/3. After enabling extension.jpg differ diff --git a/Abusive Word Hider/Output SS/3.1.png b/Abusive Word Hider/Output SS/3.1.png new file mode 100644 index 00000000..e1c5043c Binary files /dev/null and b/Abusive Word Hider/Output SS/3.1.png differ diff --git a/Abusive Word Hider/Readme.md b/Abusive Word Hider/Readme.md new file mode 100644 index 00000000..8301b0a4 --- /dev/null +++ b/Abusive Word Hider/Readme.md @@ -0,0 +1,95 @@ +

Abusive-Word Hider

+ + +
+ +So basically , After enabling this extension , it will hide abusive words from every heading and paragraphs . +and also remember , + + +Some abusive words are too bad and that's why I haven't add those in the code . + +So, if you want to add all those jump to the " .js " and add those which ever you like ( Jump to the bottom, there I have shown how you can add more words, which you want to hide). + +
+ + + +
+ +#### Tech-Stack used : + + + + ![Javascript](https://img.shields.io/badge/JavaScript-323330?style=for-the-badge&logo=javascript&logoColor=F7DF1E) + + +
+ + +## Output : + +

Before enabling the extension ( and as you can see , below the Website headng there are some abusive words . Let's hide them ...) -

+ +
+ +
+ + + + + +
+ +
+ +
+ +

Enabling the extension -

+ +
+ +
+ + + +
+ +
+ +
+ +

Output: And as you can see , It hides those abusive words ...-

+ +
+ +
+ + + + + + +
+ +
+ +
+ +
+ + +### And here you can add, more abusive words, Which you want to hide them... : +

+ +

as you can see in below " .js code " where I have written some abusive words and basically that's where you have to add which ever you want to hide words ...

+ +
+ +``` + if (element.textContent.match(/(fuck|fuck you|shit|Piss off|Dick head|Asshole|Son of a bitch|Bastard|Bitch|Damn|Wanker|Taking the piss|Twat|Bloody Oath|Root|Get Stuffed|Bugger me|Fair suck of the sav)/gi)) + element.parentElement.remove() +``` + + + diff --git a/Abusive Word Hider/manifest.json b/Abusive Word Hider/manifest.json new file mode 100644 index 00000000..7fce25c3 --- /dev/null +++ b/Abusive Word Hider/manifest.json @@ -0,0 +1,14 @@ +{ + "manifest_version": 2, + "name": "Abusive-Word Hider", + "version": "0.0.1", + "content_scripts": [ + { + "run_at": "document_idle", + "matches": [""], + "js": ["script.js"], + "exclude_matches": ["*://.google.com/*"] + } + ] +} + diff --git a/Abusive Word Hider/script.js b/Abusive Word Hider/script.js new file mode 100644 index 00000000..3f80834e --- /dev/null +++ b/Abusive Word Hider/script.js @@ -0,0 +1,10 @@ +replaceText(document.body) + +function replaceText(element) { + if (element.hasChildNodes()) { + element.childNodes.forEach(replaceText) + } else if (element.nodeType === Text.TEXT_NODE) { + if (element.textContent.match(/(fuck|fuck you|shit|Piss off|Dick head|Asshole|Son of a bitch|Bastard|Bitch|Damn|Wanker|Taking the piss|Twat|Bloody Oath|Root|Get Stuffed|Bugger me|Fair suck of the sav)/gi)) + element.parentElement.remove() + } +} \ No newline at end of file