mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 22:54:12 +01:00
Make 'popups' more intuitive.
This commit is contained in:
@@ -168,27 +168,29 @@ function Tabs() //{{{
|
||||
// TODO: Is this really applicable to Xulmus?
|
||||
options.add(["popups", "pps"],
|
||||
"Where to show requested popup windows",
|
||||
"number", 1,
|
||||
"stringlist", "tab",
|
||||
{
|
||||
setter: function (value)
|
||||
{
|
||||
let 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
|
||||
[2, 1]];// current tab unless it has specified sizes
|
||||
|
||||
options.safeSetPref("browser.link.open_newwindow.restriction", values[value][0]);
|
||||
options.safeSetPref("browser.link.open_newwindow", values[value][1]);
|
||||
let [open, restriction] = [1, 0];
|
||||
for (let [, opt] in value)
|
||||
{
|
||||
if (opt == "tab")
|
||||
open = 3;
|
||||
else if (opt == "window")
|
||||
open = 2;
|
||||
else if (opt == "resized")
|
||||
resized = 2;
|
||||
}
|
||||
|
||||
options.safeSetPref("browser.link.open_newwindow", open);
|
||||
options.safeSetPref("browser.link.open_newwindow.restriction", resized);
|
||||
return value;
|
||||
},
|
||||
completer: function (context) [
|
||||
["0", "Force to open in the current tab"],
|
||||
["1", "Always open in a new tab"],
|
||||
["2", "Open in a new window if it has a specific requested size (default in " + config.hostApplication + ")"],
|
||||
["3", "Always open in a new window"],
|
||||
["4", "Open in the same tab unless it has a specific requested size"]
|
||||
["tab", "Open popups in a new tab"],
|
||||
["window", "Open popups in a new window"],
|
||||
["resized", "Open resized popups in a new window"]
|
||||
],
|
||||
validator: Option.validateCompleter
|
||||
});
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
and <C-A> are equivalent, to map the uppercase character use <C-S-A>.
|
||||
(this might change again, as this is REALLY inconsistent, and i don't
|
||||
know if I like copying bugs)
|
||||
* IMPORTANT: 'popups' now takes a stringlist rather than a number.
|
||||
|
||||
* add [c]:keepalt[c]
|
||||
* add [c]:styledisable[c], [c]:styleenable[c], and [c]:styletoggle[c]
|
||||
|
||||
@@ -613,7 +613,7 @@ ____
|
||||
|
||||
|
||||
|\'pps'| |\'popups'| +
|
||||
||'popups' 'pps'|| number (default: 1)
|
||||
||'popups' 'pps'|| stringlist (default: tab)
|
||||
____
|
||||
Define where to show requested popup windows.
|
||||
Does not apply to windows which are opened by middle clicking a link,
|
||||
@@ -621,13 +621,15 @@ they always open in a new tab. Possible values:
|
||||
|
||||
[frame="topbot",grid="none",cols="1,10"]
|
||||
|===============================================================================
|
||||
|*0*|Force to open in the current tab (Warning: this can stop some web sites from working correctly!)
|
||||
|*1*|Always open in a new tab
|
||||
|*2*|Open in a new window if it has a specific requested size (default in Firefox)
|
||||
|*3*|Always open in a new window
|
||||
|*4*|Open in the same tab unless it has a specific requested size
|
||||
|*tab* | Open popups in a new tab
|
||||
|*window* | Open popups in a new window
|
||||
|*resized* | Open resized popups in a new window
|
||||
|===============================================================================
|
||||
|
||||
If neither *tab* nor *window* is provided, all popups open in the current tab.
|
||||
*tab* and *window* are mutually exclusive, and the last one listed is
|
||||
effective.
|
||||
|
||||
Note: This option does not change the popup blocker of Firefox in any way.
|
||||
____
|
||||
|
||||
|
||||
Reference in New Issue
Block a user