mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-10-21 07:05:43 +02:00
Use browser.tabs.maxOpenBeforeWarn rather than a hard coded value to warn when opening large numbers of tabs.
This commit is contained in:
1 parent
c32aa1f81e
commit
921c51c04d
1 file changed
+1
-1
@@ -1146,7 +1146,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
if (typeof urls == "string")
|
if (typeof urls == "string")
|
||||||
urls = dactyl.parseURLs(urls);
|
urls = dactyl.parseURLs(urls);
|
||||||
|
|
||||||
if (urls.length > 20 && !force)
|
if (urls.length > prefs.get("browser.tabs.maxOpenBeforeWarn", 20) && !force)
|
||||||
return commandline.input("This will open " + urls.length + " new tabs. Would you like to continue? (yes/[no]) ",
|
return commandline.input("This will open " + urls.length + " new tabs. Would you like to continue? (yes/[no]) ",
|
||||||
function (resp) {
|
function (resp) {
|
||||||
if (resp && resp.match(/^y(es)?$/i))
|
if (resp && resp.match(/^y(es)?$/i))
|
||||||
|
|||||||
Reference in new issue
Block a user