this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Only consider "stuffing" if there are more than 3 hashtags

+5 -1
+5 -1
src/utils/enhance-content.js
··· 139 139 // Get the <p> that contains a lot of hashtags, add a class to it 140 140 const hashtagStuffedParagraph = Array.from(dom.querySelectorAll('p')).find( 141 141 (p) => { 142 + let hashtagCount = 0; 142 143 for (let i = 0; i < p.childNodes.length; i++) { 143 144 const node = p.childNodes[i]; 144 145 ··· 151 152 const linkText = node.textContent.trim(); 152 153 if (!linkText || !linkText.startsWith('#')) { 153 154 return false; 155 + } else { 156 + hashtagCount++; 154 157 } 155 158 } else { 156 159 return false; 157 160 } 158 161 } 159 - return true; 162 + // Only consider "stuffing" if there are more than 3 hashtags 163 + return hashtagCount > 3; 160 164 }, 161 165 ); 162 166 if (hashtagStuffedParagraph) {