Last active
August 29, 2015 14:07
-
-
Save d11e9/e70097e405db31d046fb to your computer and use it in GitHub Desktop.
subdue status lines on freenode webchat
This file contains 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
window.$ = window.$$ | |
// Subue status lines on webchat.freenode.net | |
// This is to allow content to be dicernable. | |
// d11e9 | |
setInterval( function(){ | |
var lines = $('.colourline'); | |
var lines_with_ts = lines.filter( function(node){ | |
return node.childNodes.length === 3 && node.childNodes[0].className === 'timestamp'; | |
}); | |
var lines_with_st = lines_with_ts.filter( function(node){ | |
return node.childNodes[1].innerHTML === '=='; | |
}); | |
console.log( 'Subdueing status lines ('+ lines_with_st.length +')' ); | |
lines_with_st.each( function(node){ | |
node.setAttribute( 'style', 'opacity:0.5;' ); | |
}); | |
console.log('Subdueing status lines') | |
}, 5000 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment