1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-04-07 21:13:33 +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:
Kris Maglione
2011-02-11 14:01:41 -05:00
parent c32aa1f81e
commit 921c51c04d

View File

@@ -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))