diff --git a/chrome/content/vimperator/options.js b/chrome/content/vimperator/options.js
index c79d17a0..d53a1cc4 100644
--- a/chrome/content/vimperator/options.js
+++ b/chrome/content/vimperator/options.js
@@ -224,7 +224,20 @@ function Options() //{{{
function setTitleString(value)
{
document.getElementById("main-window").setAttribute("titlemodifier", value);
- document.title = window.content.document.title + " - " + value; // not perfect fix, but good enough
+ if (window.content.document.title.length > 0)
+ document.title = window.content.document.title + " - " + value;
+ else
+ document.title = value;
+ }
+
+ function setPopups(value)
+ {
+ var values = [ [0, 1], // always in current tab
+ [0, 3], // in a new tab
+ [2, 3], // in a new window if it has specified sizes
+ [1, 2]];// always in new window
+ storePreference("browser.link.open_newwindow.restriction", values[value][0]);
+ storePreference("browser.link.open_newwindow", values[value][1]);
}
//
@@ -447,6 +460,21 @@ function Options() //{{{
validator: function (value) { if (value >= 1 && value <= 1000) return true; else return false; }
}
));
+ addOption(new Option(["popups", "pps"], "number",
+ {
+ short_help: "Where to show requested popup windows",
+ help: "Define where to show requested popup windows. Does not apply to windows which are opened by middle clicking a link, they always open in a new tab. " +
+ "Possible values: