http://www.perlmonks.org?node_id=1115253


in reply to Re: Free nodelet hack: Auto-Fold threads in RAT
in thread Free nodelet hack: Auto-Fold threads in RAT for special browsers

more collapsing

RAT head and foot now auto-collapsed. Headlines for manual unfolding added.

<!-- ==================================================== COLLAPSING RAT VIEW 2.02 ==================================================== --> <style type="text/css"> <!-- p.collapsed, form.collapsed { display:none; } p.expanded, form.expanded { display:block; } --> </style> <script language="javascript"><!-- var expandState="expanded"; function toggle_threads(){ expandState = (expandState=='expanded') ? 'collapsed' : 'expanded' ; var elements = document.getElementsByTagName('ul'); var elnum; for( elnum=0; elnum<elements.length; elnum++ ){ var el = elements[elnum]; if ( el.parentNode.className.match(/nnt-depth-1/) ) el.className = expandState; if ( el.id == 'ul-legend') el.className = 'collapsed'; } } function collapse_RAT_head_n_foot() { // --- hide head var head_div = document.getElementById('nodethreads-head'); var head_p = head_div.children[0]; head_p.id = 'head-view'; head_p.className = 'collapsed'; var title_html = '<h3 onclick="toggleMenu(\'head-view\')"> +/- Vie +w </h3>'; head_div.innerHTML = title_html + head_div.innerHTML; // --- hide foot var config_form = document.forms[2]; var config_head = document.getElementsByName('nnt-config')[0]; config_form.id ='form-config'; config_form.className ='collapsed'; config_head.innerHTML = "+/- " + config_head.innerHTML; config_head.onclick = function () { toggleMenu('form-config') }; } if ( document.title.match(/Recently Active Threads/) ) { collapse_RAT_head_n_foot(); document.writeln('<a href="javascript:toggle_threads()">+/- Thread +s</a>'); // if (navigator.appName=="Obigo") toggle_threads(); } //--></script>

update

Todo:

  • global expand toggle: move from free nodelet to main pane
  • disable section title links , let collapse too
  • collapse top right navigation
  • shorten repeated parts in post titles per thread
  • +- toggle hard to click, click thread title instead
  • collapse nodelets
  • add icons for navigation
  • collapse posts text in full thread

    Cheers Rolf

    PS: /Je suis Charlie!