In Q3 of last year, Experts Exchange introduced a new
Messaging System, allowing any member to communicate directly with other members.
During an especially long thread with a member, I wanted to go back to previous messages in the exchange to refresh my memory on an issue. However, the Message System doesn't have a
Search function that allows you to search the contents of all messages in a thread. But then it occurred to me that I could take advantage of the search feature in my browser, Firefox (
Edit>Find or
Ctrl-F). However, to do that, all of the messages would have to be expanded by clicking the plus sign next to each one:
![Plus-sign---Expand.jpg]()
That's very painful in a long thread! So I submitted an enhancement request entitled
Need the ability to expand/collapse all messages in a thread in the
Messaging System testing project. An EE Administrator,
eenookami, replied to my request with a fantastic work-around — JavaScript code to expand all messages in a thread, as well as JavaScript code to collapse all of them.
In the spirit of giving credit where credit is due, all of the credit goes to
eenookami for this solution. My only minor contributions are taking the time to write the article in order to share the solution with other members of the EE community and adding an explanation of how to place the
Expand All and
Collapse All items on the
Firefox Bookmarks Toolbar (I'm sure this can be achieved in other modern browsers, but this article discusses only Firefox — I hope other members post comments on this article explaining how to do it in other browsers or, even better, write their own articles on it).
Here are the solution steps for
Firefox (probably works on all releases, or at least relatively recent ones):
o If you don't already use the
Bookmarks Toolbar, click the
View menu, then
Bookmarks, then
Bookmarks Toolbar.
o Click the
Bookmarks menu, then
Show All Bookmarks.
o In the left pane, right-click on the Bookmarks Toolbar and then click
New Bookmark:
o Give whatever name you want to the bookmark that will expand all messages (such as
ExpandAll) and then place eenookami's clever JavaScript code in the Location field:
javascript:void($('.expand-toggle').click());
It should look like this:
o Give whatever name you want to the bookmark that will collapse all messages (such as
CollapseAll) and, once again, place eenookami's clever JavaScript code in the Location field:
javascript:void($('.collapse-toggle').click());
It should look like this:
Now a
single mouse click on the ExpandAll icon on the Bookmarks Toolbar will
instantly expand all messages in the thread for easy perusal and, even better, searching for text via Edit>Find (Ctrl-F). Likewise, a
single mouse click on the CollapseAll icon on the Bookmarks Toolbar will
instantly collapse all messages in the thread.
Thanks again to eenookami for this excellent work-around (until Search and/or and Expand/Collapse features are added to the EE Messaging System), as well as for giving me permission to write and publish an EE article about the solution.
If you find this article to be helpful, please click the
thumbs-up icon below. This lets me know what is valuable for EE members and provides direction for future articles. Thanks very much! Regards, Joe
Comments (2)
Commented:
For those interested, it is called a bookmarklet and it will work it all browsers. For those adventurous ones, you can write your own bookmarklets to do anything on the site you would otherwise do with a click or a keypress on your keyboard. I'll leave the examples for your imagination...
The bug report that started this is: http://support.experts-exchange.com/customer/portal/articles/1162518
Cheers,
eenookami
Author
Commented:Thanks for the compliment and the Helpful Vote — I appreciate both! Additional thanks for the further explanation of bookmarklet — very interesting!
Btw, the link you posted for the bug report that started this does not seem to be right, but it gave me the idea to include that link in the article, which I will do in a moment. Regards, Joe