rem: for (var entry in client.munger.entries) 
add: var branch = client.prefManager.prefBranch; for (var entry in munger.entries) 
context: function initMunger(){    /* linkRE: the general URL linkifier regular expression:     *     * - start with whitespace, non-word, or begining-of-line     * - then match:     *   - EITHER scheme (word + hyphen), colon, then lots of non-whitespace     *   - OR "www" followed by at least 2 sets of:     *     - "." plus some non-whitespace, non-"." characters     * - must end match with a word-break     * - include a "/" or "=" beyond break if present     * - end with whitespace, non-word, or end-of-line     */    client.linkRE =        /(?:\s|\W|^)((?:(\w[\w-]+):[^\s]+|www(\.[^.\s]+){2,})\b[\/=]?)(?=\s|\W|$)/;    const LOW_PRIORITY = 5;    const NORMAL_PRIORITY = 10;    const HIGH_PRIORITY = 15;    const HIGHER_PRIORITY = 20;    var munger = client.munger = new CMunger(insertHyphenatedWord);    // Special internal munger!    munger.addRule(".inline-buttons", /(\[\[.*?\]\])/, insertInlineButton,                   10, 5, false);    munger.addRule("quote", /(``|'')/, insertQuote,                   NORMAL_PRIORITY, NORMAL_PRIORITY);    munger.addRule("bold", /(?:\s|^)(\*[^*()]*\*)(?:[\s.,]|$)/,                   "chatzilla-bold", NORMAL_PRIORITY, NORMAL_PRIORITY);    munger.addRule("underline", /(?:\s|^)(\_[^_()]*\_)(?:[\s.,]|$)/,                   "chatzilla-underline", NORMAL_PRIORITY, NORMAL_PRIORITY);    munger.addRule("italic", /(?:\s|^)(\/[^\/()]*\/)(?:[\s.,]|$)/,                   "chatzilla-italic", NORMAL_PRIORITY, NORMAL_PRIORITY);    /* allow () chars inside |code()| blocks */    munger.addRule("teletype", /(?:\s|^)(\|[^|]*\|)(?:[\s.,]|$)/,                   "chatzilla-teletype", NORMAL_PRIORITY, NORMAL_PRIORITY);    munger.addRule(".mirc-colors", /(\x03((\d{1,2})(,\d{1,2}|)|))/,                   mircChangeColor, NORMAL_PRIORITY, NORMAL_PRIORITY);    munger.addRule(".mirc-bold", /(\x02)/, mircToggleBold,                   NORMAL_PRIORITY, NORMAL_PRIORITY);    munger.addRule(".mirc-underline", /(\x1f)/, mircToggleUnder,                   NORMAL_PRIORITY, NORMAL_PRIORITY);    munger.addRule(".mirc-color-reset", /(\x0f)/, mircResetColor,                   NORMAL_PRIORITY, NORMAL_PRIORITY);    munger.addRule(".mirc-reverse", /(\x16)/, mircReverseColor,                   NORMAL_PRIORITY, NORMAL_PRIORITY);    munger.addRule("ctrl-char", /([\x01-\x1f])/, showCtrlChar,                   NORMAL_PRIORITY, NORMAL_PRIORITY);    munger.addRule("link", client.linkRE, insertLink, NORMAL_PRIORITY, HIGH_PRIORITY);    // This has a higher starting priority so as to get it to match before the    // normal link, which won't know about mailto and then fail.    munger.addRule(".mailto",       /(?:\s|\W|^)((mailto:)?[^:;\\<>\[\]()\'\"\s\u201d]+@[^.<>\[\]()\'\"\s\u201d]+\.[^<>\[\]()\'\"\s\u201d]+)/i,                   insertMailToLink, NORMAL_PRIORITY, HIGHER_PRIORITY, false);    munger.addRule("bugzilla-link",                   /(?:\s|\W|^)(bug\s+(?:#?\d+|#[^\s,]{1,20}))/i,                   insertBugzillaLink, NORMAL_PRIORITY, NORMAL_PRIORITY);    munger.addRule("channel-link",                /(?:\s|\W|^)[@%+]?(#[^<>,\[\](){}\"\s\u201d]*[^:,.<>\[\](){}\'\"\s\u201d])/i,                   insertChannelLink, NORMAL_PRIORITY, NORMAL_PRIORITY);    munger.addRule("talkback-link", /(?:\W|^)(TB\d{8,}[A-Z]?)(?:\W|$)/,                   insertTalkbackLink, NORMAL_PRIORITY, NORMAL_PRIORITY);    munger.addRule("face",         /((^|\s)(?:[>]?[B8=:;(xX][~']?[-^v"]?(?:[)|(PpSs0oO\?\[\]\/\\]|D+)|>[-^v]?\)|[oO9][._][oO9])(\s|$))/,         insertSmiley, NORMAL_PRIORITY, NORMAL_PRIORITY);    munger.addRule("rheet", /(?:\s|\W|^)(rhee+t\!*)(?:\s|$)/i, insertRheet, 10, 10);    munger.addRule("word-hyphenator",                   new RegExp ("(\\S{" + client.MAX_WORD_DISPLAY + ",})"),                   insertHyphenatedWord, LOW_PRIORITY, NORMAL_PRIORITY);    client.enableColors = client.prefs["munger.colorCodes"];    for (var entry in client.munger.entries)    {        var branch = client.prefManager.prefBranch;        if (entry[0] != ".")        {            try            {                munger.entries[entry].enabled =                    branch.getBoolPref("munger." + entry);            }            catch (ex)            {                // nada            }        }    }}
meta: 1622	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1622/d5df3c06989a0a7f373efbeafdc39c43311ed175/mungers.js/buggy/xul/content/mungers.js