Expand/Collapse Threads

No replies
jw25's picture
Joined: 08/17/2008
Posts: 48
User is online

Buttons

A simple button to expand/collapse all threads in Mozilla Thunderbird.

Expand/Collapse Threads
Compatibility: 

Thunderbird 3.*

Author(s): 
jw25
Description & info:

Behavior

Action Behavior

Left

Expand all threads

Right

Collapse all threads

Revisions

Revision Operations
02/13/2010 - 10:10 by morat

changed description

current revision
02/03/2010 - 15:39 by jw25

first attempt

Code

javascript: Copy To Clipboard
/*Code*/

Init

javascript: Copy To Clipboard
/*Initialization Code*/
 
if (typeof custombuttons.uCbuttonButes != 'function') {
	alert(custombuttons.bundle.GetStringFromName('ButtonCompatabilityAlert'));
	this.disable(true);
}
 
var Msg = createMsg(this.label);
 
 
/*----------------- Custom Buttons2 Mouse Handler ------------------*/
this.leftclick   = function(evt){
	goDoCommand('cmd_expandAllThreads');
}
 
this.midclick  = function(evt){
 
}
 
this.rightclick  = function(evt){
	goDoCommand('cmd_collapseAllThreads');
 
}
 
 
this.setAttribute( 'onclick', 'gQuot( event, this )' ); // Calls the Golbal MouseClick handler gQuot
 
/*----------------- Custom Buttons2 Mouse Handler End -------------------*/
/*---------------------- Button Code Block Start ------------------------*/
this.startProcess=function(path,args){
var file = Components.classes['@mozilla.org/file/local;1']
    .createInstance(Components.interfaces.nsILocalFile);
var process = Components.classes['@mozilla.org/process/util;1']
    .getService(Components.interfaces.nsIProcess);
 file.initWithPath(path.replace(/\//g,'\\\\')); 
 file.launch();
}
 
/*----------------------- Button Code Block End -------------------------*/
/*---------------------- Show Focus Block Start ------------------------*/
/*
this.style.opacity = '.65';
this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
*/
 
/*----------------------- Show Focus Block End -------------------------*/
/*--------------- Custom Buttons2 Attributes Block Start ----------------*/
this.setAttribute('author','jw25');
this.setAttribute('version','20100202.00');
this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/expandcollapse-threads.html');
this.setAttribute('dependency','null');
this.setAttribute('status','Dev');
this.setAttribute('public',true);
 
 
this.tooltipText = '  L: Expand    R: Collapse  ';
 
/*---------------- Custom Buttons2 Attributes Block End -----------------*/

Help

/*Help*/

Details

Button Categories: 

Custom Buttons² v.3.1.0

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Ant.com Toolbar 2.0 Firefox/3.0.3, (.NET CLR 3.5.30729)

Posted with the theme Pluralism

Top