quotecollapse
| resources: | Home Contact Installation Customising Source Code Members Screenshots |
|---|
Other Stuff
Customising
Key bindings
You can define a key binding for QuoteCollapse by using the Keyconfig extension. The necessary code to execute on a keypress is as follows:
var messageDocument = QuoteCollapse._messagePane.contentDocument;
bq = messageDocument.getElementsByTagName("blockquote").item(0);
if( ! bq ) return;
var newstate= ! QuoteCollapse._getState(bq);
QuoteCollapse._setTree(messageDocument, newstate);
In future versions of QuoteCollapse there will be a special utility function QuoteCollapse.Toggle() which accomplishes the same.
Style
The style that QuoteCollapse applies by default is equivalent to the following:
blockquote[type="cite"] {
background: url("chrome://quotecollapse/skin/twisty-clsd.png") no-repeat top left;
height: 2ex;
padding-bottom: 0px ! important;
overflow: -moz-hidden-unscrollable;
}
blockquote[type="cite"][qctoggled="true"] {
background: url("chrome://quotecollapse/skin/twisty-open.png") no-repeat top left;
height: auto;
overflow: visible;
}
Therefore, you can style everything through your userContent.css. You can edit this file by hand or using the
ChromeEdit extension. Note that you have to use the "important" flag to override the default settings. Note also the use of BODY.mailview which ensures that the style is applied when viewing mails only (not in the editor).
Examples:
- Expand all quotes by default:
BODY.mailview blockquote[type="cite"] { background-image: url("chrome://quotecollapse/skin/twisty-open.png") !important; background-repeat: no-repeat !important; background-position: top left !important; height: auto !important; overflow: visible !important; } BODY.mailview blockquote[type="cite"][qctoggled="true"] { background-image: url("chrome://quotecollapse/skin/twisty-clsd.png") !important; background-repeat: no-repeat !important; background-position: top left !important; height: 2ex !important; padding-bottom: 0px !important; overflow: -moz-hidden-unscrollable !important; } - No twisty when expanded:
BODY.mailview blockquote[type="cite"][qctoggled="true"] { background-image: none ! important ; } - Minimize collapsed size to the height of the twisty:
BODY.mailview blockquote[type="cite"]:not([qctoggled="true"]) { height: 9px !important; } - Always keep 1st level expanded:
/* overwrite quotecollapse default */ blockquote[type="cite"] { background-image: none !important; height: auto !important; overflow: visible !important; } /* reinstate for level 1 and above: */ BODY.mailview blockquote[type="cite"] blockquote[type="cite"] { background-image: url("chrome://quotecollapse/skin/twisty-clsd.png") !important; background-repeat: no-repeat !important; background-position: top left !important; height: 2ex !important; padding-bottom: 0px !important; overflow: -moz-hidden-unscrollable !important; } BODY.mailview blockquote[type="cite"] blockquote[type="cite"][qctoggled="true"] { background-image: url("chrome://quotecollapse/skin/twisty-open.png") !important; background-repeat: no-repeat !important; background-position: top left !important; height: auto !important; overflow: visible !important; } - Always expand the first quote:
This may need to be tweaked depending on quoting styles. E.g., add the same rule for blockquotes which are first childs instead of adjacent to a first child pre./* overwrite quotecollapse default for first quote */ DIV > pre:first-child + blockquote[type="cite"] { background-image: none !important; height: auto !important; overflow: visible !important; } - Collapse only the first quote:
The same remark as above applies. Also, if you want twisties inside of the first quote, add rules for level 1 and deeper (see the example on expanding 1st level)./* overwrite quotecollapse default for first quote */ blockquote[type="cite"] { background-image: none !important; height: auto !important; overflow: visible !important; } /* reinstate for second quote and following: */ BODY.mailview DIV > pre:first-child + blockquote[type="cite"] { background-image: url("chrome://quotecollapse/skin/twisty-clsd.png") !important; background-repeat: no-repeat !important; background-position: top left !important; height: 2ex !important; padding-bottom: 0px !important; overflow: -moz-hidden-unscrollable !important; } BODY.mailview DIV > pre:first-child + blockquote[type="cite"][qctoggled="true"] { background-image: url("chrome://quotecollapse/skin/twisty-open.png") !important; background-repeat: no-repeat !important; background-position: top left !important; height: auto !important; overflow: visible !important; }