Thursday, May 04, 2006

Expanding Gmail's Filter Input

This item was sent to you by slash.pd@gmail.com from Google Reader. Expanding Gmail's Filter Input Gmail has a seemingly simple but actually powerful filtering system. The "Has the words" input field can be used for arbitrary queries. However, the one line input is very cramped when trying to filter multiple mailing lists at once. A textarea would be more appropriate. Initially, this seemed like a job for Greasemonkey. However, since the filter input form is created dynamically, it's hard to detect when it's visible without resorting to polling. Instead, it seemed easier to find the right node with a CSS selector like input[name="cf1_has"]. Then, XBL can be used to replace the input node with a textarea node (styled appropriately). All that's really necessary is to insert the following in userContent.css:@-moz-document domain(mail.google.com) { input[name="cf1_has"] { display: none; -moz-binding: url(http://persistent.info/files/gmail-filte. .. Source: http://feeds.feedburner.com/PersistentInfo?m=17 If you no longer wish to receive message like this, please contact the sender. Try Google Reader today: http://www.google.com/reader/

--
http://peterdawson.typepad.com
PeterDawson Home of ThoughtFlickr's
"This message is printed on Recycled Electrons."

No comments: