context: function hookDoc(win, doc) {    torbutton_log(1, "Hooking document");    if (!m_wasinited) {        torbutton_init();    }    if(typeof(win.__tb_did_hook) != 'undefined')        return; // Ran already        win.__tb_did_hook = true;    torbutton_log(1, "JS to be set to: " +m_prefs.getBoolPref("javascript.enabled"));    var browser = getBrowser();    var tor_tag = !m_prefs.getBoolPref("extensions.torbutton.tor_enabled");    var js_enabled = m_prefs.getBoolPref("javascript.enabled");    // Find proper browser for this document.. ugh.    for (var i = 0; i < browser.browsers.length; ++i) {        var b = browser.browsers[i];        if (b && b.contentDocument == doc) {            b.__tb_js_state = tor_tag;            b.docShell.allowJavascript = js_enabled;        }    }    torbutton_log(1, "JS set to: "         + m_prefs.getBoolPref("javascript.enabled"));    // No need to hook js if tor is off, right?    if(!m_prefs.getBoolPref("extensions.torbutton.tor_enabled")             || !m_prefs.getBoolPref('extensions.torbutton.kill_bad_js'))        return;    var str = "<"+"script>";    str += m_jshooks; //    str +="alert(\"hi\");";    str += "</"+"script>";    var d = doc.createElement("div");    d.style.visibility = 'hidden';    d.innerHTML = str;    getBody(doc).insertBefore(d, getBody(doc).firstChild);}
meta: 3444	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3444/6eb06242dc852a2fb22e7c2c565004d895833f1b/torbutton.js/clean/src/chrome/content/torbutton.js