1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-15 12:03:32 +01:00

Support 'titlestring' in private browsing mode.

This commit is contained in:
Doug Kearns
2009-06-25 22:43:41 +10:00
parent ddfa294e1b
commit f4b94374ae
2 changed files with 14 additions and 22 deletions

View File

@@ -528,24 +528,16 @@ const config = { //{{{
getter: function () !services.get("io").offline
});
// TODO: merge with Vimperator version and add Muttator version
// (TB handles this differently).
options.add(["titlestring"],
"Change the title of the window",
"string", "Xulmus",
{
setter: function (value)
{
try
{
document.getElementById(config.mainWindowID).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);
}
document.documentElement.setAttribute("titlemodifier", value);
getBrowser().updateTitlebar();
return value;
}