summaryrefslogtreecommitdiff
path: root/vimperator/content/config.js
diff options
context:
space:
mode:
authorDoug Kearns <dougkearns@gmail.com>2009-06-25 22:43:41 +1000
committerDoug Kearns <dougkearns@gmail.com>2009-06-28 16:03:17 +1000
commitf4b94374aedb9dab6b0132a3d9011d6c0bc5a1ed (patch)
treed6e4ede9d75622bbac9342481ef714d85e5512b4 /vimperator/content/config.js
parentddfa294e1bdb1898cdaeb33abd6aa9d7d2970dcc (diff)
downloadpentadactyl-f4b94374aedb9dab6b0132a3d9011d6c0bc5a1ed.tar.gz
Support 'titlestring' in private browsing mode.
Diffstat (limited to 'vimperator/content/config.js')
-rw-r--r--vimperator/content/config.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/vimperator/content/config.js b/vimperator/content/config.js
index 1dc7219d..9213d508 100644
--- a/vimperator/content/config.js
+++ b/vimperator/content/config.js
@@ -477,24 +477,24 @@ 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", "Vimperator",
{
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)
+ let elem = document.documentElement;
+
+ elem.setAttribute("titlemodifier", value);
+ // TODO: remove this FF3.5 test when we no longer support 3.0
+ if (Ci.nsIPrivateBrowsingService)
{
- liberator.log("Couldn't set titlestring", 3);
+ elem.setAttribute("titlemodifier_privatebrowsing", value);
+ elem.setAttribute("titlemodifier_normal", value);
}
+ getBrowser().updateTitlebar();
return value;
}