1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 11:57:59 +01:00

Fix: bookmarks.js loading error.

liberator.modules.options has not been defined when bookmarks.js is loading.
This commit is contained in:
anekos
2008-12-23 07:57:27 +09:00
parent f96b522ec1
commit cd9715fc6b

View File

@@ -28,10 +28,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
const DEFAULT_FAVICON = "chrome://mozapps/skin/places/defaultFavicon.png";
if (liberator.options.getPref("extensions.vimperator.commandline_cmd_history"))
{
// Try to import older command line history, quick marks, etc.
liberator.registerObserver("load_options", function () {
if (!liberator.modules.options.getPref("extensions.vimperator.commandline_cmd_history"))
return;
let store = liberator.storage["history-command"];
let pref = liberator.options.getPref("extensions.vimperator.commandline_cmd_history");
for (let [k, v] in Iterator(pref.split("\n")))
@@ -47,7 +48,6 @@ if (liberator.options.getPref("extensions.vimperator.commandline_cmd_history"))
liberator.options.resetPref("extensions.vimperator.commandline_search_history");
liberator.options.resetPref("extensions.vimperator.quickmarks");
});
}
// also includes methods for dealing with keywords and search engines
function Bookmarks() //{{{