1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 02:37:58 +01:00

move remaining preference setting from vimperator.startup to Options()

This commit is contained in:
Doug Kearns
2007-08-07 12:14:42 +00:00
parent 9bbaca69b7
commit a4ac7010fc
2 changed files with 26 additions and 21 deletions

View File

@@ -227,6 +227,23 @@ function Options() //{{{
document.title = window.content.document.title + " - " + value; // not perfect fix, but good enough
}
//
// firefox preferences which need to be changed to work well with vimperator
//
// work around firefox popup blocker
var popup_allowed_events = loadPreference('dom.popup_allowed_events', 'change click dblclick mouseup reset submit');
if (!popup_allowed_events.match("keypress"))
storePreference('dom.popup_allowed_events', popup_allowed_events + " keypress");
// TODO: shouldn't we be resetting these in destroy() as well?
// we have our own typeahead find implementation
storePreference('accessibility.typeaheadfind.autostart', false);
storePreference('accessibility.typeaheadfind', false); // actually the above setting should do it, but has no effect in firefox
// start with saved session
storePreference("browser.startup.page", 3);
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// PUBLIC SECTION //////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
@@ -246,6 +263,14 @@ function Options() //{{{
return null;
}
this.destroy = function()
{
// reset some modified firefox prefs
if (loadPreference('dom.popup_allowed_events', 'change click dblclick mouseup reset submit')
== popup_allowed_events + " keypress")
storePreference('dom.popup_allowed_events', popup_allowed_events);
}
// TODO: separate Preferences from Options? Would these utility functions
// be better placed in the 'core' vimperator namespace somewhere?
Options.setPref = function(name, value)