Last active
July 25, 2017 16:27
-
-
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…)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(()=>{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')}}})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
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