CIRCChannel.getFontCSS Member

Syntax

object.getFontCSS(format);

Arguments

ArgumentSummary
format

Returns

Remarks

See Also

Source Code

function this_getFontCSS(format)
{
/* Wow, this is cool. We just put together a CSS-rule string based on the
* font preferences. *This* is what CSS is all about. :)
* We also provide a "data: URL" format, to simplify other code.
*/
var css;
var fs;
var fn;
if (this.prefs["font.family"] != "default")
fn = "font-family: " + this.prefs["font.family"] + ";";
else
fn = "font-family: inherit;";
if (this.prefs["font.size"] != 0)
fs = "font-size: " + this.prefs["font.size"] + "pt;";
else
fs = "font-size: medium;";
css = "body.chatzilla-body { " + fs + fn + " }";
if (format == "data")
return "data:text/css," + encodeURIComponent(css);
return css;
}