mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 22:42:26 +01:00
fixed some muttator specific errors in the console
This commit is contained in:
@@ -307,8 +307,8 @@ liberator.Events = function () //{{{
|
|||||||
}
|
}
|
||||||
function exitPopupMode()
|
function exitPopupMode()
|
||||||
{
|
{
|
||||||
// gContextMenu is set to NULL by firefox, when a context menu is closed
|
// gContextMenu is set to NULL by Firefox, when a context menu is closed
|
||||||
if (!gContextMenu && !activeMenubar)
|
if (typeof gContextMenu != "undefined" && gContextMenu == NULL && !activeMenubar)
|
||||||
liberator.modes.remove(liberator.modes.MENU);
|
liberator.modes.remove(liberator.modes.MENU);
|
||||||
}
|
}
|
||||||
function enterMenuMode()
|
function enterMenuMode()
|
||||||
@@ -662,7 +662,8 @@ liberator.Events = function () //{{{
|
|||||||
// removeEventListeners() to avoid mem leaks
|
// removeEventListeners() to avoid mem leaks
|
||||||
window.dump("TODO: remove all eventlisteners\n");
|
window.dump("TODO: remove all eventlisteners\n");
|
||||||
|
|
||||||
getBrowser().removeProgressListener(this.progressListener);
|
if (typeof(getBrowser) != "undefined")
|
||||||
|
getBrowser().removeProgressListener(this.progressListener);
|
||||||
|
|
||||||
window.removeEventListener("popupshown", enterPopupMode, true);
|
window.removeEventListener("popupshown", enterPopupMode, true);
|
||||||
window.removeEventListener("popuphidden", exitPopupMode, true);
|
window.removeEventListener("popuphidden", exitPopupMode, true);
|
||||||
|
|||||||
@@ -72,28 +72,6 @@ const liberator = (function () //{{{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
liberator.options.add(["titlestring"], // TODO: broken for Thunderbird
|
|
||||||
"Change the title of the window",
|
|
||||||
"string", "Vimperator",
|
|
||||||
{
|
|
||||||
setter: function (value)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var id = liberator.config.mainWindowID || "main-window";
|
|
||||||
document.getElementById(id).setAttribute("titlemodifier", value);
|
|
||||||
if (window.content.document.title.length > 0)
|
|
||||||
document.title = window.content.document.title + " - " + value;
|
|
||||||
else
|
|
||||||
document.title = value;
|
|
||||||
}
|
|
||||||
catch (e)
|
|
||||||
{
|
|
||||||
liberator.log("Couldn't set titlestring", 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
liberator.options.add(["verbose", "vbs"],
|
liberator.options.add(["verbose", "vbs"],
|
||||||
"Define which type of messages are logged",
|
"Define which type of messages are logged",
|
||||||
"number", 0,
|
"number", 0,
|
||||||
@@ -892,7 +870,6 @@ const liberator = (function () //{{{
|
|||||||
loadModule("autocommands", liberator.AutoCommands);
|
loadModule("autocommands", liberator.AutoCommands);
|
||||||
loadModule("io", liberator.IO);
|
loadModule("io", liberator.IO);
|
||||||
loadModule("completion", liberator.Completion);
|
loadModule("completion", liberator.Completion);
|
||||||
// loadModule("previewwindow" = liberator.InformationList("liberator-previewwindow", { incrementalFill: false, maxItems: 10 });
|
|
||||||
|
|
||||||
// This adds options/mappings/commands which are only valid in this particular extension
|
// This adds options/mappings/commands which are only valid in this particular extension
|
||||||
if (liberator.config.init)
|
if (liberator.config.init)
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ liberator.config = {
|
|||||||
// load Muttator specific modules
|
// load Muttator specific modules
|
||||||
if (this.isComposeWindow)
|
if (this.isComposeWindow)
|
||||||
{
|
{
|
||||||
|
this.features = ["mail"];
|
||||||
|
|
||||||
// TODO: move mappings elsewhere, probably compose.js
|
// TODO: move mappings elsewhere, probably compose.js
|
||||||
liberator.mappings.add([liberator.modes.COMPOSE],
|
liberator.mappings.add([liberator.modes.COMPOSE],
|
||||||
["e"], "Edit message",
|
["e"], "Edit message",
|
||||||
|
|||||||
@@ -376,6 +376,28 @@ liberator.config = { //{{{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
liberator.options.add(["titlestring"],
|
||||||
|
"Change the title of the window",
|
||||||
|
"string", "Vimperator",
|
||||||
|
{
|
||||||
|
setter: function (value)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var id = liberator.config.mainWindowID || "main-window";
|
||||||
|
document.getElementById(id).setAttribute("titlemodifier", value);
|
||||||
|
if (window.content.document.title.length > 0)
|
||||||
|
document.title = window.content.document.title + " - " + value;
|
||||||
|
else
|
||||||
|
document.title = value;
|
||||||
|
}
|
||||||
|
catch (e)
|
||||||
|
{
|
||||||
|
liberator.log("Couldn't set titlestring", 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
liberator.options.add(["urlseparator"],
|
liberator.options.add(["urlseparator"],
|
||||||
"Set the separator regexp used to separate multiple URL args",
|
"Set the separator regexp used to separate multiple URL args",
|
||||||
"string", ",\\s");
|
"string", ",\\s");
|
||||||
|
|||||||
Reference in New Issue
Block a user