Collapse StatusNet Threads

A couple of days ago, I saw this:
Identica notice by laroquod saying: What I wouldn't give for a "collapse all threads in the Home timeline" command… I thought this:
challenge accepted And wrote this:

Bookmarklet

Drag this to your bookmark bar: Collapse threads

This is the human readable code for the above:

1
2
3
4
5
6
7
8
9
10
11
var elems = document.getElementsByClassName('threaded-replies');
for (var i=0; i<elems.length; i++) {
    var notices = elems[i].getElementsByClassName('notice');
    for (var j=0; j<notices.length; j++) {
        notices[j].style.display = 'none';
    }
    notices = elems[i].getElementsByClassName('notice-repeats');
    for (j=0; j<notices.length; j++) {
        notices[j].style.display = 'none';
    }
}

2 Responses to “Collapse StatusNet Threads”

  1. jpope says:

    I love this bookmarklet. Thanks! :)

Leave a Reply