Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Free nodelet hack: Auto-Fold threads in RAT

by LanX (Archbishop)
on Feb 01, 2015 at 23:48 UTC ( #1115253=note: print w/replies, xml ) Need Help??


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!

  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Node Status?
    node history
    Node Type: note [id://1115253]
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others cooling their heels in the Monastery: (5)
    As of 2019-05-24 22:50 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Do you enjoy 3D movies?



      Results (151 votes). Check out past polls.

      Notices?
      • (Sep 10, 2018 at 22:53 UTC) Welcome new users!