Skip to content

Instantly share code, notes, and snippets.

@snoopdouglas
Last active July 25, 2017 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snoopdouglas/8dcf1a26ba7f46752d2f20b426b3292f to your computer and use it in GitHub Desktop.
Save snoopdouglas/8dcf1a26ba7f46752d2f20b426b3292f to your computer and use it in GitHub Desktop.
Remove CrowdFire tweets from your stream (need to make a Chrome plugin out of this…)
(()=>{var a=document.querySelectorAll('.stream-item');for(var b=0;b<a.length;b++){var c=a[b];if(c.children[0]&&c.children[0].classList.contains('js-original-tweet')){var h=c.querySelector('.tweet-text').innerText,j=h.match(/ via @[a-z0-9_]+( #[a-z0-9_])*$/i);j&&(c.style.display='none')}}})();
(() => {
const items = document.querySelectorAll('.stream-item')
for(let i = 0; i < items.length; i++) {
const item = items[i]
if(!item.children[0])
continue
if(!item.children[0].classList.contains('js-original-tweet'))
continue
const text = item.querySelector('.tweet-text').innerText
const match = text.match(/ via @[a-z0-9_]+( #[a-z0-9_])*$/i)
if(match)
item.style.display = 'none'
}
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment