mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-07 22:53:32 +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:
@@ -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