From 7ff8ed51d215cfdd220926249203dd2f2be3e924 Mon Sep 17 00:00:00 2001 From: hardik-pratap-singh <21bcs090@iiitdmj.ac.in> Date: Fri, 30 Aug 2024 10:07:34 +0530 Subject: [PATCH] updated manifest.json && deleted prototype --- browser-extension/prototype/index.html | 57 ------- browser-extension/prototype/index.js | 141 ---------------- browser-extension/prototype/index2.html | 39 ----- browser-extension/prototype/index2.js | 141 ---------------- browser-extension/prototype/index3.html | 51 ------ browser-extension/prototype/index3.js | 160 ------------------ browser-extension/prototype/index4.js | 212 ------------------------ browser-extension/prototype/info.png | Bin 13149 -> 0 bytes browser-extension/prototype/new.js | 28 ---- 9 files changed, 829 deletions(-) delete mode 100644 browser-extension/prototype/index.html delete mode 100644 browser-extension/prototype/index.js delete mode 100644 browser-extension/prototype/index2.html delete mode 100644 browser-extension/prototype/index2.js delete mode 100644 browser-extension/prototype/index3.html delete mode 100644 browser-extension/prototype/index3.js delete mode 100644 browser-extension/prototype/index4.js delete mode 100644 browser-extension/prototype/info.png delete mode 100644 browser-extension/prototype/new.js diff --git a/browser-extension/prototype/index.html b/browser-extension/prototype/index.html deleted file mode 100644 index e5b08797..00000000 --- a/browser-extension/prototype/index.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - Document - - - - -

-
- -

- Lorem ipsum dolor sit amet consectetur crazy adipisicing elit. Quaerat alias iste quo exercitationem stupid - nesciunt ea? -

- -

- - - - Lorem ipsum, dolor sit amet stupid mad adipisicing elit. Magni minima adipisci architecto. -

-
- - - -
- -
-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsa possimus quisquam temporibus - reprehenderit nesciunt dignissimos sunt ipsum, nostrum modi? Iusto libero sed alias! -

- crazy -
-
- - -

- Lorem ipsum dolor crazy Lorem, ipsum dolor. sit stupid amet consectetur adipisicing elit. Aut architecto illum dolorum - mad. -

- - - - - \ No newline at end of file diff --git a/browser-extension/prototype/index.js b/browser-extension/prototype/index.js deleted file mode 100644 index 7d1f1860..00000000 --- a/browser-extension/prototype/index.js +++ /dev/null @@ -1,141 +0,0 @@ -function checkFalseTextNode(text, actualLengthOfText) { - let totalNewlineAndWhitespaces = 0; - for (let i = 0; i < text.length; i++) { - if (text[i] === "\n" || text[i] === " " || text[i] === "\t") { // I think not only \n and " " , if a textNode is comprised of any escape characters and whitespace, it should be a false textNode - totalNewlineAndWhitespaces++; - } - } - return totalNewlineAndWhitespaces === actualLengthOfText; -} - -// Function to recursively get all text nodes under a given node -function getAllTextNodes(node, uliStore) { - if (node.nodeType === 3) { // Text node - if (!checkFalseTextNode(node.data, node.length)) { - uliStore.push({ node: node, parent: node.parentNode }); - } - } else { - let children = Array.from(node.childNodes); - children.forEach(child => getAllTextNodes(child, uliStore)); - } -} - - -function findPositions(word, text) { - let positions = {}; - - let len = word.length - let loc = [] - let index = text.toString().indexOf(word); - while (index !== -1) { - let obj = {}; - loc.push([index, index + len]); - index = text.toString().indexOf(word, index + 1); - } - - - if (loc.length !== 0) { - positions.slurText = word - positions.slurLocation = loc; - } - return positions; -} - - -function locateSlur(uliStore, targetWords) { - let n = uliStore.length; - - for (let i = 0; i < n; i++) { - let store = uliStore[i]; //This will contain the textNode - let parentNode = store.parent - let text = store.node.textContent - //We have to look into this store for all the slurWords - let slurs = []; - - targetWords.forEach(targetWord => { - let slurWord = targetWord; - let pos = findPositions(slurWord, text); - if (Object.keys(pos).length !== 0) { - slurs.push(pos) - } - - if (parentNode.innerHTML.includes(targetWord)) { - const className = `icon-container-${targetWord}`; - const parts = parentNode.innerHTML.split(targetWord); - const replacedHTML = parts.join(`${targetWord}`); - parentNode.innerHTML = replacedHTML - } - }) - uliStore[i].slurs = slurs; - } - return uliStore; //This will return the final uliStore (after appending slurs) -} - - -function addMetaData(targetWords) { - targetWords.forEach(targetWord => { - const className = `icon-container-${targetWord}` - const elements = Array.from(document.querySelectorAll(`.${className}`)) - elements.forEach(element => { - - let sup = document.createElement("sup"); - - let img = document.createElement("img"); - img.style.height = "2%" - img.style.width = "2%" - img.style.cursor = "pointer" - // img.src = "https://upload.wikimedia.org/wikipedia/commons/4/43/Minimalist_info_Icon.png" - img.src = "./info.png" - img.alt = "altText" - - let span = document.createElement("span") - span.style.display = "none" - span.style.position = "absolute" - span.style.backgroundColor = "antiquewhite" - span.style.border = "1px solid black" - span.style.borderRadius = "12px" - span.style.padding = "2px 6px" - span.style.width = "12rem" - span.style.textAlign = "justify" - span.innerHTML = `This is ${targetWord}` - - - if (targetWord === "crazy") { - span.innerHTML = `Referring to behaviors or situations as "crazy" can perpetuate stereotypes about mental health and may be hurtful to those with mental health conditions.` - } - else if (targetWord === "mad") { - span.innerHTML = `Using "mad" to describe someone negatively can be insensitive, as it historically stigmatizes mental health issues and can imply irrationality or instability.` - } - else if (targetWord === 'stupid') { - span.innerHTML = `Describing actions or decisions as "stupid" can be demeaning and hurtful, as it implies lack of intelligence or judgment, which can be offensive to individuals or groups.` - } - else { - span.innerHTML = `This word is considered offensive or derogatory due to its association with negative stereotypes about people with disabilities. Using such terms can perpetuate discrimination and harm individuals by devaluing their worth and capabilities.` - } - - - sup.appendChild(img) - sup.appendChild(span) - - element.append(sup) - let sups = element.children[0] - let spans = element.children[0].children[1] - const svgs = element.children[0].children[0]; - svgs.addEventListener('mouseover', function () { - sups.children[1].style.display = "inline-block" - }); - - svgs.addEventListener('mouseout', function () { - sups.children[1].style.display = "none" - }); - }) - }) -} - - -let targetWords = ["stupid", "crazy", "Crazy", "mad"] -let uliStore = [] -getAllTextNodes(document.body, uliStore) -abc = locateSlur(uliStore, targetWords) -console.log("uliStore", abc) -addMetaData(targetWords) diff --git a/browser-extension/prototype/index2.html b/browser-extension/prototype/index2.html deleted file mode 100644 index 5b2bf827..00000000 --- a/browser-extension/prototype/index2.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - Document - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/browser-extension/prototype/index2.js b/browser-extension/prototype/index2.js deleted file mode 100644 index bbd6c27a..00000000 --- a/browser-extension/prototype/index2.js +++ /dev/null @@ -1,141 +0,0 @@ -function checkFalseTextNode(text, actualLengthOfText) { - let totalNewlineAndWhitespaces = 0; - for (let i = 0; i < text.length; i++) { - if (text[i] === "\n" || text[i] === " " || text[i] === "\t") { // I think not only \n and " " , if a textNode is comprised of any escape characters and whitespace, it should be a false textNode - totalNewlineAndWhitespaces++; - } - } - return totalNewlineAndWhitespaces === actualLengthOfText; -} - -// Function to recursively get all text nodes under a given node -function getAllTextNodes(node, uliStore) { - if (node.nodeType === 3) { // Text node - if (!checkFalseTextNode(node.data, node.length)) { - uliStore.push({ node: node, parent: node.parentNode }); - } - } else { - let children = Array.from(node.childNodes); - children.forEach(child => getAllTextNodes(child, uliStore)); - } -} - - -function findPositions(word, text) { - let positions = {}; - - let len = word.length - let loc = [] - let index = text.toString().indexOf(word); - while (index !== -1) { - let obj = {}; - loc.push([index, index + len]); - index = text.toString().indexOf(word, index + 1); - } - - - if (loc.length !== 0) { - positions.slurText = word - positions.slurLocation = loc; - } - return positions; -} - - -function locateSlur(uliStore, targetWords) { - let n = uliStore.length; - - for (let i = 0; i < n; i++) { - let store = uliStore[i]; //This will contain the textNode - let parentNode = store.parent - let text = store.node.textContent - //We have to look into this store for all the slurWords - let slurs = []; - - targetWords.forEach(targetWord => { - let slurWord = targetWord; - let pos = findPositions(slurWord, text); - if (Object.keys(pos).length !== 0) { - slurs.push(pos) - } - - if (parentNode.innerHTML.includes(targetWord)) { - const className = `icon-container-${targetWord}`; - const parts = parentNode.innerHTML.split(targetWord); - const replacedHTML = parts.join(`${targetWord}*`); - parentNode.innerHTML = replacedHTML - } - }) - uliStore[i].slurs = slurs; - } - return uliStore; //This will return the final uliStore (after appending slurs) -} - - -function addMetaData(targetWords) { - targetWords.forEach(targetWord => { - const className = `icon-container-${targetWord}` - const elements = Array.from(document.querySelectorAll(`.${className}`)) - elements.forEach(element => { - - let sup = document.createElement("sup"); - - let img = document.createElement("img"); - img.style.height = "2%" - img.style.width = "2%" - img.style.cursor = "pointer" - // img.src = "https://upload.wikimedia.org/wikipedia/commons/4/43/Minimalist_info_Icon.png" - img.src = "./info.png" - img.alt = "altText" - - let span = document.createElement("span") - span.style.display = "none" - span.style.position = "absolute" - span.style.backgroundColor = "antiquewhite" - span.style.border = "1px solid black" - span.style.borderRadius = "12px" - span.style.padding = "2px 6px" - span.style.width = "12rem" - span.style.textAlign = "justify" - span.innerHTML = `This is ${targetWord}` - - - if (targetWord === "crazy") { - span.innerHTML = `Referring to behaviors or situations as "crazy" can perpetuate stereotypes about mental health and may be hurtful to those with mental health conditions.` - } - else if (targetWord === "mad") { - span.innerHTML = `Using "mad" to describe someone negatively can be insensitive, as it historically stigmatizes mental health issues and can imply irrationality or instability.` - } - else if (targetWord === 'stupid') { - span.innerHTML = `Describing actions or decisions as "stupid" can be demeaning and hurtful, as it implies lack of intelligence or judgment, which can be offensive to individuals or groups.` - } - else { - span.innerHTML = `This word is considered offensive or derogatory due to its association with negative stereotypes about people with disabilities. Using such terms can perpetuate discrimination and harm individuals by devaluing their worth and capabilities.` - } - - - sup.appendChild(img) - sup.appendChild(span) - - element.append(sup) - let sups = element.children[0] - let spans = element.children[0].children[1] - const svgs = element.children[0].children[0]; - svgs.addEventListener('mouseover', function () { - sups.children[1].style.display = "inline-block" - }); - - svgs.addEventListener('mouseout', function () { - sups.children[1].style.display = "none" - }); - }) - }) -} - - -let targetWords = ["stupid", "crazy", "Crazy", "mad"] -let uliStore = [] -getAllTextNodes(document.body, uliStore) -abc = locateSlur(uliStore, targetWords) -console.log("uliStore", abc) -// addMetaData(targetWords) diff --git a/browser-extension/prototype/index3.html b/browser-extension/prototype/index3.html deleted file mode 100644 index d7f9dab0..00000000 --- a/browser-extension/prototype/index3.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - Document - - - - - - - - -

- -

- - - - - - - - - - \ No newline at end of file diff --git a/browser-extension/prototype/index3.js b/browser-extension/prototype/index3.js deleted file mode 100644 index 1834978a..00000000 --- a/browser-extension/prototype/index3.js +++ /dev/null @@ -1,160 +0,0 @@ -function checkFalseTextNode(text, actualLengthOfText) { - let totalNewlineAndWhitespaces = 0; - for (let i = 0; i < text.length; i++) { - if (text[i] === "\n" || text[i] === " " || text[i] === "\t") { // I think not only \n and " " , if a textNode is comprised of any escape characters and whitespace, it should be a false textNode - totalNewlineAndWhitespaces++; - } - } - return totalNewlineAndWhitespaces === actualLengthOfText; -} - -// Function to recursively get all text nodes under a given node -function getAllTextNodes(node, uliStore) { - if (node.nodeType === 3) { // Text node - if (!checkFalseTextNode(node.data, node.length)) { - uliStore.push({ node: node, parent: node.parentNode }); - } - } else { - let children = Array.from(node.childNodes); - children.forEach(child => getAllTextNodes(child, uliStore)); - } -} - - -function findPositions(word, text) { - let positions = {}; - - let len = word.length - let loc = [] - let index = text.toString().indexOf(word); - while (index !== -1) { - let obj = {}; - loc.push([index, index + len]); - index = text.toString().indexOf(word, index + 1); - } - - - if (loc.length !== 0) { - positions.slurText = word - positions.slurLocation = loc; - } - return positions; -} - - -function locateSlur(uliStore, targetWords) { - let n = uliStore.length; - - for (let i = 0; i < n; i++) { - let store = uliStore[i]; //This will contain the textNode - let parentNode = store.parent - let textnode = store.node - let text = store.node.textContent - let tempParent = document.createElement("span"); //I chose span over p because span is an inline element and p is a block element, injecting block - //element would cause a lot of change in the stylings and can damage the overall webpage to a greater extent - tempParent.textContent = text; - //We have to look into this store for all the slurWords - let slurs = []; - - targetWords.forEach(targetWord => { - let slurWord = targetWord; - let pos = findPositions(slurWord, text); - if (Object.keys(pos).length !== 0) { - slurs.push(pos) - } - - if (tempParent.innerHTML.includes(targetWord)) { - const className = `icon-container-${targetWord}`; - const parts = tempParent.innerHTML.split(targetWord); - const replacedHTML = parts.join(`${targetWord}`); - tempParent.innerHTML = replacedHTML - } - }) - // for(let i = 0 ; i < ) - // console.log("tempParent " , tempParent) - uliStore[i].nodeToParent = tempParent - uliStore[i].slurs = slurs; - - - //Additional O(N) complexity - // parentNode.childNodes.forEach((node) => { - // if (node === textnode) { - // parentNode.replaceChild(tempParent, node) - // } - // }); - - //O(1) complexity - parentNode.replaceChild(tempParent, textnode) - - } - return uliStore; //This will return the final uliStore (after appending slurs) -} - - -function addMetaData(targetWords) { - targetWords.forEach(targetWord => { - const className = `icon-container-${targetWord}` - const elements = Array.from(document.querySelectorAll(`.${className}`)) - elements.forEach(element => { - - let sup = document.createElement("sup"); - - let img = document.createElement("img"); - img.style.height = "3%" - img.style.width = "3%" - img.style.cursor = "pointer" - img.src = "https://upload.wikimedia.org/wikipedia/commons/4/43/Minimalist_info_Icon.png" - // img.src = "./info.png" - img.alt = "altText" - - let span = document.createElement("span") - span.style.display = "none" - span.style.position = "absolute" - span.style.backgroundColor = "antiquewhite" - span.style.border = "1px solid black" - span.style.borderRadius = "12px" - span.style.padding = "2px 6px" - span.style.width = "12rem" - span.style.textAlign = "justify" - span.innerHTML = `This is ${targetWord}` - - - if (targetWord === "crazy") { - span.innerHTML = `Referring to behaviors or situations as "crazy" can perpetuate stereotypes about mental health and may be hurtful to those with mental health conditions.` - } - else if (targetWord === "mad") { - span.innerHTML = `Using "mad" to describe someone negatively can be insensitive, as it historically stigmatizes mental health issues and can imply irrationality or instability.` - } - else if (targetWord === 'stupid') { - span.innerHTML = `Describing actions or decisions as "stupid" can be demeaning and hurtful, as it implies lack of intelligence or judgment, which can be offensive to individuals or groups.` - } - else { - span.innerHTML = `This word is considered offensive or derogatory due to its association with negative stereotypes about people with disabilities. Using such terms can perpetuate discrimination and harm individuals by devaluing their worth and capabilities.` - } - - - sup.appendChild(img) - sup.appendChild(span) - - element.append(sup) - let sups = element.children[0] - let spans = element.children[0].children[1] - const svgs = element.children[0].children[0]; - svgs.addEventListener('mouseover', function () { - sups.children[1].style.display = "inline-block" - }); - - svgs.addEventListener('mouseout', function () { - sups.children[1].style.display = "none" - }); - }) - }) -} - - -let targetWords = ["stupid", "crazy", "Crazy", "mad" , "Mad" , "MAD"] -let uliStore = [] -getAllTextNodes(document.body, uliStore) -abc = locateSlur(uliStore, targetWords) -console.log("uliStore", abc) -addMetaData(targetWords) diff --git a/browser-extension/prototype/index4.js b/browser-extension/prototype/index4.js deleted file mode 100644 index 9c88a883..00000000 --- a/browser-extension/prototype/index4.js +++ /dev/null @@ -1,212 +0,0 @@ -let slurList = - 'जिहादी|छक्का|छिनाल|रंडी|रण्डी|रांड|रंडीखाना|रण्डी रोना|लुल्ली|गांड|कुतिया|कुत्ती|बत्तमीज़|कुल्टा|हरामजादी|साली|चुदाई|ma ki chui|मा के भोसड़े|भोस्डीके|भोछडी वाला |लोड़ू|बहन चोद|मादरचोद|लानती|छुतीये|चूतिये |चूत|लौड़ा|लौड़े|चरित्रहीन |लिब्राण्डू|नंगी पुंगी|पागल औरत |बाज़ारू औरत|बलात्कार|बदसूरत|मुजरा|जाहिल औरत|औरत-ए-जाहिल|भोसड़ीwala|चंडाल चौकड़ी|म्लेच्छा|सूअर|सूअर की औलाद|दोगली|🏹🏹|पनौती|हरामी|गधी|बुरखा धत्त|बुल्ली |कलमुंही |पिछवाड़ा|काम वाली बाई|पैर की जूती|गंदी नाली|हगना|सुल्ली|हिज़रापंती|naachne waali|तवाइफ़|सौ टका टंच माल|किन्नर|गद्दार|चमचा|चमची|आतंकवादी|मुलिया|Katwa|चाटुकार|बहन की लोड़ी|चुस्लिम|चुस्लामि|चुसल्मान|चूस|भीमटा|भीमटी|बैल बुद्धि|हलाला|भद्दी औरत|भांड औरत|भाड़े का टट्टू|दो कौड़ी की औरत|घटिया औरत|बेहूदा औरत|चालू औरत|झूठी औरत|मर क्यों नहीं जाती|नल्ली|भूतनी के|चूत के बाल|मादरजात|भड़वा|चूची|टट्टी|गटर पैदाइश|मुँह मैं ले|मूत|नाजायज़|कटा लुंड|काला टेंट|जूता खायेगी|बुरखे वाली|काली कलूटी|काले तवे|मोटी भैंस|देहातन|देहाती औरत|गणिका|हबशी|ओला हु उबर|ABLANARI|AblaNari|ablanari|chakka|jihidis|jihadi|Jihidi|zehadi|jehadan|jihadinon|Chakko|chakki|chaka|Chinal|Randi|ramdi|Randie|randya|randikhana|randi ke beej|Lulli|Gasti|Meetha|Halwa|Gud|Gaandu|Gaand|Gandiaal|lodu|kutiya|kutti|Chudail|Badchalan|Battameez|kulta|haramjadi|dyan|saali|sali|chod|chodu bhagat|chudai|chooda|chuda|Bhdsk|2BHK|Bhosi ke|bsdk|bhonsdi ke|bhosad|bhosdiwale|maa ka bhosra|Lodu|bhenchod|Madarchod|Maderchod|mcp|mc|Lanti|chutiye|chutiya|Chut|hutiye|chutie|chutia|chut ke dhakkan|chut marli|chutan|Lavde|Gandu|Rakhail|librandu|chal phut|nangi poongi|pagal aurat|bazaru|bazari aurat|ola hi uber hai|balatkar|Ugly|Mujra|mujra|jaahil aurat|Mulli|hilana|hilaogi|Mlechcha|Suar|suar ki aulad|doghli|Panauti|panooti|harami|gadhi|रनडwa|🅱️ulli|kalmuhi|pichwada|jhadu|bai|kaam wali bai|pair ki jutti|naali|hagna|tukde tukde gang|Sulli|नाचने वाली|Tawaif|sau taka tunch maal|Skirt waali bai|Dhimmi hood|Dhimmihood|izzlam|gaddar|chamcha|chamchi|aatankwadi|Mulliya|Uncut|chatukar|Bahan Ke loudi|Kachra|Chuslim|chuslami|Chusalmans|chus|Bhimta|bheem-meem walas|bail budhi|Budhdhi|हलाला|bhadi aurat|bhanndh aurat|bhadi ka tattu|2 Kaudi ki aurat|Gatiya|Ghatiya aurat|behuda aurat|chalu aurat|jhuti aurat|Kaali aurat|Kaali bhaand|marr kyun nahi jaati|nalli|dimaag se paidal|bhootni|bhootni ke|choot ke baal|madarjaat|bhadva|bhadvi|bhandve|chuchi|tatti|maa ka boba chusu|mooh|munh mein le|mutth|najayaz paidaish|najayaz aulaad|Gutter ki paidaish|kata Lund|kala tent|joota khayegi|burkhe waali|ladki kahin ka|victim card|Aurat card|kali kalutti|Kale tawe|naali saaf kar|moti bhains|sukkhi haddi|Pataka|choodiyan pehen lo|abba ka naam|Ganika|gaand phadna|chewtypa|atrocuty_act|RandiKutiya|sulli|Rice bags|ola u uber|lovejihad|dull-it|toxic aunty|Presstitutes|libtard|bimbo|slims|Black Pepper|faggot|Sissy|whore|chrislamocommies|piddilover|Dynast Sycophants|Deshdrohi Chinese|Pak agents|Chinese Corona|Chinks|chinky|Feminazi|Mulli|halala|Half M|Scumreds|scumbags|burnol|anti national tukde|pheminist|dented-painted|Muzlim|Buzlim|Izzlam|pissfull|Simp|Bitch| Ms |sekoolar|sickular|sc0undrel|Characterless woman|Drama Queen|Ferrorists|Cunt|Slut|pussy|ugly|stupid|promiscuous|crazy|fat|fag|homo|hoe|motherfucker|sisterfucker|bastard|bint|dyke|gash|muslimette|muttah|scag|gender nigger|assfucker|boobs|boobies|Melons|lesbain|moslem|nasty|redlight|nymph|piss|pimp|poop|pube|puke|retarded|slave|sissy|ola uh uber|pu55i|pu55y|mothafuck|mothafucka|mothafuckaz|mothafucked|mothafucker|mothafuckin|mothafucking |mothafuckings|motherfuck|motherfucked|motherfucker|motherfuckin|motherfucking|motherfuckings|lesbain|lesbayn|lesbian|lesbin|lesbo|nastyslut|nastywhore|nastybitch|nastyho|Koodhi|pottai|Potta Alith|Aththai|athai|loosu|fuck|cunt'; - - - - - -function checkFalseTextNode(text, actualLengthOfText) { - let totalNewlineAndWhitespaces = 0; - for (let i = 0; i < text.length; i++) { - if (text[i] === "\n" || text[i] === " " || text[i] === "\t") { - // I think not only \n and " " , if a textNode is comprised of any escape characters and whitespace, it should be a false textNode - totalNewlineAndWhitespaces++; - } - } - return totalNewlineAndWhitespaces === actualLengthOfText; -} - - -// Function to recursively get all text nodes under a given node -function getAllTextNodes(node, uliStore) { - if (node.nodeType === 3) { // Text node - if (!checkFalseTextNode(node.data, node.length)) { - uliStore.push({ node: node, parent: node.parentNode }); - } - } else { - let children = Array.from(node.childNodes); - children.forEach(child => getAllTextNodes(child, uliStore)); - } -} - - - -/* getAllTextNodes() ENDS HERE */ - - -/* locateSlur() STARTS HERE */ - -function findPositions(word, text) { - let positions = {}; - - let len = word.length - let loc = [] - let index = text.toString().indexOf(word); - while (index !== -1) { - let obj = {}; - loc.push([index, index + len]); - index = text.toString().indexOf(word, index + 1); - } - - - if (loc.length !== 0) { - positions.slurText = word - positions.slurLocation = loc; - } - return positions; -} - - - -function locateSlur(uliStore, targetWords) { - let n = uliStore.length; - - for (let i = 0; i < n; i++) { - let store = uliStore[i]; //This will contain the textNode - let parentNode = store.parent - let textnode = store.node - let text = store.node.textContent - let tempParent = document.createElement("span"); //I chose span over p because span is an inline element and p is a block element, injecting block - //element would cause a lot of change in the stylings and can damage the overall webpage to a greater extent - tempParent.textContent = text; - - let slurs = []; - let slurPresentInTempParent = false; - targetWords.forEach(targetWord => { - let slurWord = targetWord; - let pos = findPositions(slurWord, text); - if (Object.keys(pos).length !== 0) { - slurs.push(pos) - } - - if (tempParent.innerHTML.includes(targetWord)) { - const className = `icon-container-${targetWord}`; - const parts = tempParent.innerHTML.split(targetWord); - const replacedHTML = parts.join(`${targetWord}`); - tempParent.innerHTML = replacedHTML - slurPresentInTempParent = true; - } - }) - // for(let i = 0 ; i < ) - // console.log("tempParent " , tempParent) - uliStore[i].nodeToParent = tempParent - uliStore[i].slurs = slurs; - - //O(1) complexity - if (slurPresentInTempParent) { - // parentNode.replaceChild(tempParent, textnode) - textnode.replaceWith(tempParent) - // textnode.replaceWith(createTextNode(tempParent.innerHTML)) - - } - - } - return uliStore; -} - - -/* locateSlur() ENDS HERE */ - - - - -/* addMetaData() STARTS HERE */ - -function addMetaData(targetWords) { - targetWords.forEach(targetWord => { - const className = `icon-container-${targetWord}` - console.log("className " , className) - const elements = Array.from(document.querySelectorAll(`.${className}`)) - elements.forEach(element => { - - let sup = document.createElement("sup"); - - let img = document.createElement("img"); - img.style.height = "2%" - img.style.width = "2%" - img.style.cursor = "pointer" - img.src = "https://upload.wikimedia.org/wikipedia/commons/4/43/Minimalist_info_Icon.png" - // img.src = "./info.png" - img.alt = "altText" - - let span = document.createElement("span") - // span.style.all = "unset" - span.style.display = "none" - span.style.position = "absolute" - span.style.backgroundColor = "antiquewhite" - span.style.border = "1px solid black" - span.style.borderRadius = "12px" - span.style.padding = "2px 6px" - // span.style.width = "12rem" - span.style.textAlign = "justify" - span.style.fontWeight = "lighter" - span.style.color = "black" - span.style.zIndex = "1000000000"; // This ensures it appears above other elements - span.style.fontSize = "14px" - span.style.textDecoration = "none" - span.style.fontStyle = "normal" - // span.style.height = "fit-content" - span.innerHTML = `This is ${targetWord}` - - // span.style.display = "none"; - // span.style.position = "absolute"; - // span.style.backgroundColor = "antiquewhite !important"; - // span.style.border = "1px solid black !important"; - // span.style.borderRadius = "12px !important"; - // span.style.padding = "2px 6px !important"; - // span.style.width = "12rem !important"; - // span.style.textAlign = "justify !important"; - // span.innerHTML = `This is ${targetWord}`; - - - - - if (targetWord.toLowerCase() === "crazy") { - span.innerHTML = `It can perpetuate stereotypes about mental health and may be hurtful to those with mental health conditions.` - } - else if (targetWord.toLowerCase() === "mad") { - span.innerHTML = `Using "mad" to describe someone negatively can be insensitive.` - } - else if (targetWord.toLowerCase() === 'stupid') { - span.innerHTML = `Describing actions or decisions as "stupid" can be demeaning and hurtful.` - } - else { - span.innerHTML = `This word is considered offensive.` - } - - - sup.appendChild(img) - sup.appendChild(span) - - element.append(sup) - let sups = element.children[0] - let spans = element.children[0].children[1] - const svgs = element.children[0].children[0]; - svgs.addEventListener('mouseover', function () { - sups.children[1].style.display = "inline-block" - // sups.children[1].style.display = "block" - }); - - svgs.addEventListener('mouseout', function () { - sups.children[1].style.display = "none" - }); - }) - }) -} - - - -// let targetWords = ["stupid", "crazy", "Crazy", "mad" , "Mad" , "MAD"] -let targetWords = slurList.split("|"); -targetWords = targetWords.filter((x) => x.split(" ").length == 1) ; -// let removeHash = targetWords.filter((x) => x.includes("#")===false); - -console.log(targetWords) -// console.log(oneWordTargetWords) -// console.log(targetWords) ; -let uliStore = [] -getAllTextNodes(document.body, uliStore) -abc = locateSlur(uliStore, targetWords) -// console.log("uliStore", abc) -addMetaData(targetWords) - diff --git a/browser-extension/prototype/info.png b/browser-extension/prototype/info.png deleted file mode 100644 index 311011c6321e34669f055e688e9adb713e680d5e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13149 zcmX|o2|U!@_y3GB#0-k;OZGCB$eKbWGPHQcHugbytfB16%qSI!#+t2dlo{J3gwSWQ z^&p%Izrvb3)aSAoo2-C;Ex}XHUoP0hd_RMOHjC3| z;!HhP!!@*dBqqK{@!jBZL|CphHIk<_&h29DB>wv)TtQnXPpAj|9#OTHQ26@Gx04)S zl4W1#JcNO2^3$K(qAN&=q44~cT#JZBuEq6)mZ(>q`V@Wgkkysa4}PdVu0E6uQKC|mbU{o+~@WhvI z!}RXhg{B7j{m4CGW?@2M;@S;g3zS6*&^EX_2eK@AWIbVAZnUuF9KTbG$r+rBjmJ}D zI@d()lrlp?gGdO!!4<_Fh4z^GGRFPeMC(Z|u?TmggM6jDY^6;0D|B&)e3?vw~W=8f_qol zL3;N!aisW+ha169gV_IXg(c4Jld}7F*T)+~+>JMsFO)A<1$V6jX=t0kUT)66#UsV_ zj~{i-g>&3EG8|7Y)qtI18jMRpsH>X*{UUq7j+_|_}7x6m_l4v zk?QMmHd2sxe~wV1yt{Qm$p(=rhsj}vnsZvAtK_t}bY=Z%QBE*NumARSf{HWC-a?5I zjo7nS)^6sa10m=zwvfM2@Z^#St?L!F1oxVIlY3>J&Obbb859LF9@$G>{fG_quMVFFkb?Bu{i8q_@ z`XhIOSd5T1u19%x;1$$ob*OVcR+o{XLBu6#^&cdAA|`kG(NcVb!xY2#R|t9dD}d=% z#g2sCMq*Ei8C_?^Rt|Bv`*lnR(?pj2@gS~F#2r;xUnNGN813uecfK(HJbZ&6U}=)t zJP@{f-bflh6n=08#Tm=6X*kO!>*47!@&&aOb7)07lYX!M=2}?K zt8n?+B(zNtOKLvt)8B`CEeS#HR&mc`J8_oM{Myz3py%Xo%`N6#dFsT#+Gg?{u0w4U<;a)k zp%IE5rQJ)__XV}Y@wJ3eam_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3@2IMY4ezRxOIMflxc-jt4kw1Ao zCY%Npz}#C1PxPb=FAe9bu;LF~Cdo^6HU({CQLVl*1s&b=cVf~GLIF^Ec#^H?Wiz_{ z@iz!hMcG!}13k*woq8N6Xg`?&Sn>f&om`m4iVkU3JJa4x1pln^_st7EIrc_k8rkd^ zjuO4P_Al@Tbu$sMH=`KqCgVrA2da2g-61ypeyvj;zUxse-k(UI1h<&Pp>(cF`)KPmBvnyV;o+QLaqMT?cLs#e_;&cM2oVA|hP7sa} z*Jf^55illa#{8zALNi{f*`OlZ0oddy=KK3TlipDHu>S+ev5uA|t^oH1ZSL zkzW^|RxlXfPqm8zoRLovr2wto`9g6eTSvLtkn?j4Dm_fTi_!&TYCJdjSB3U4?$*HNQFzs1?kn1J6O(nc#EgkY6$C3i$|U`chY!#*tFzO zO#h_IC$6X$iBnR>;rxy%XsTN`O zsi8pKd8Fm7sB|+#j5I5tiZOTz1Bzj6@MZQJpk}-a7(DP!8s%cVM?9+RtDKGIXYH_q z^H?Z|d>hQ{!ltT3T7p{R6*0o=I3*0beoiTu4l-Z zpyx*yI%nv6e^v5UqKZG5&XY6+%EU|CV zl(Sr%E|;T`eGP5HOxEf**yV~S*l03X{AP6T{Z>|5EWMy_4;oycC|B5;>}az8a*<{Y zuHpj@v-lWf&Dap`U_|+puG6^*`j>CTh~kBBMvv##jRJx$x7$2-CCn08$^w3(g#TQs z=4u7!54;*dI@ddIcS@#7+^mRU>_{X&rPkp&_iw^Vn`eIoweTxpz z0)1k^iOX?0HchGGTAGq*wP?KQP1Pl|0YLj&@d!T@7PqKcA*iV;djAStiS+)Kb)OsQ zbYG`4q)wmc&P_;=%sbjh`JqC%mv4!47{Di9#7ohB3(16VnsXjEIU>M6yv6C`mB&cb F{|E5(mn#4O diff --git a/browser-extension/prototype/new.js b/browser-extension/prototype/new.js deleted file mode 100644 index b57a9d91..00000000 --- a/browser-extension/prototype/new.js +++ /dev/null @@ -1,28 +0,0 @@ -const iconSrc = './info.svg'; -const iconAlt = 'Icon description'; -const targetWords = ['crazy', 'stupid', 'mad']; // Replace with your list of target words - -// Find all elements that contain any of the target words -document.querySelectorAll('*').forEach(element => { - targetWords.forEach(targetWord => { - if (element.innerHTML.includes(targetWord)) { - const className = `icon-container-${targetWord}`; - // Split the innerHTML into parts to handle replacements - const parts = element.innerHTML.split(targetWord); - const replacedHTML = parts.join(`${targetWord}`); - - // Update the element with the replaced content - element.innerHTML = replacedHTML; - - // Add icon after each occurrence of the target word - const iconContainers = element.querySelectorAll(`.${className}`); - iconContainers.forEach(container => { - const icon = document.createElement('img'); - icon.src = iconSrc; - icon.alt = iconAlt; - container.appendChild(icon); - - }); - } - }); -}); \ No newline at end of file