From 4b17d7614447000309084f97e893b95d71f74463 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sun, 25 Nov 2012 14:18:36 +0000 Subject: [PATCH] Extend 10 tabs to 100 tabs 10 tabs can sometimes be too few no one should ideally need more than 100 tabs open so this is a good new level. Doesn't appear to impact on DOM or JS at all, especially as I don't need to rework code to move to an unlimited tabs setup instead. Having a limit also helps save crashing or bogging down the browser. --- index.php | 2 +- lib/ice-coder.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index e967e73..523ac55 100644 --- a/index.php +++ b/index.php @@ -116,7 +116,7 @@ window.onbeforeunload = function() {
'; } ?>
diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 0e5a9e9..faf8ad1 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -508,8 +508,8 @@ var ICEcoder = { shortURL = top.ICEcoder.thisFileFolderLink.replace(/\|/g,"/"); // No reason why we can't open a file (so far) canOpenFile = true; - // Limit to 10 files open at a time - if (top.ICEcoder.openFiles.length<10) { + // Limit to 100 files open at a time + if (top.ICEcoder.openFiles.length<100) { // check if we've already got it in our array if (top.ICEcoder.openFiles.indexOf(shortURL)>-1 && shortURL!="/[NEW]") { // we have, so instead, switch to that tab @@ -517,8 +517,8 @@ var ICEcoder = { top.ICEcoder.switchTab(i+1); } } else { - // show a message because we have 10 files open - top.ICEcoder.message('Sorry, you can only have 10 files open at a time!'); + // show a message because we have 100 files open + top.ICEcoder.message('Sorry, you can only have 100 files open at a time!'); canOpenFile = false; }