rem: winhooks = Components.classes[ "component: 
add: winhooks = Components.classes[ "@mozilla.org/winhooks;1" ].getService( Components.interfaces.nsIWindowsHooks ); 
context: function Startup() {    if ( !winhooks ) {        // Get component service.        try {            winhooks = Components.classes[ "component://mozilla/winhooks" ].getService( Components.interfaces.nsIWindowsHooks );            if ( winhooks ) {                // Try to get preferences.                prefs = winhooks.settings;                // Now transfer those to the dialog checkboxes.                for( var index in settings  ) {                    var setting = settings[ index ];                    var checkbox = document.getElementById( setting );                    if ( checkbox && prefs[ setting ] ) {                        checkbox.setAttribute( "checked", "true" );                    }                }            }        }        catch(e) {            dump( e + "\n" );            alert( "Rats!" );        }    }             // If all is well, hook into "Ok".    if ( winhooks && prefs && parent && parent.hPrefWindow ) {        parent.hPrefWindow.registerOKCallbackFunc( onOK );    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/6cc70ebd6c97bd0b2fe48c31f579e855387ced9d/pref-winhooks.js/buggy/xpfe/components/prefwindow/resources/content/pref-winhooks.js