Skip to content

Instantly share code, notes, and snippets.

@ucnv
Forked from swdyh/tweets_filter.user.js
Created May 6, 2010 18:04
Show Gist options
  • Save ucnv/392469 to your computer and use it in GitHub Desktop.
Save ucnv/392469 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name tweets_filter
// @namespace http://www.relucks.org/
// @include http://twitter.com/
// ==/UserScript==
var re = /./
// var re = /(4sq.com|#example)/
filter(document)
document.addEventListener("DOMNodeInserted", function(e){
if (e.target.tagName) {
filter(e.target)
}
}, false)
function filter(node) {
Array.forEach(node.querySelectorAll('span.entry-content'), function(i) {
if (i.innerHTML.match(re)) {
var li = i.parentNode.parentNode
// li.style.opacity = 0.2
li.style.display = 'none'
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment