From cd7eaf36d1c6bf9d41a50cc3bf9de3366a401126 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sat, 31 Oct 2015 21:17:35 +0100 Subject: [PATCH] Script preferences - script terminated by timeout (very many matches) --- content/scriptprefs.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/content/scriptprefs.js b/content/scriptprefs.js index c507582b1..11d49c492 100644 --- a/content/scriptprefs.js +++ b/content/scriptprefs.js @@ -35,12 +35,16 @@ window.addEventListener('load', function() { }; gUserIncludesEl.pages = gScript.userIncludes; - for (var i = 0; i < gScript.matches.length; i++) { - gScriptMatchesEl.addPage(gScript.matches[i].pattern); + var matchesPattern = []; + for (var i = 0, count = gScript.matches.length; i < count; i++) { + matchesPattern.push(gScript.matches[i].pattern); } - for (var i = 0; i < gScript.userMatches.length; i++) { - gUserMatchesEl.addPage(gScript.userMatches[i].pattern); + gScriptMatchesEl.pages = matchesPattern; + var userMatchesPattern = []; + for (var i = 0, count = gScript.userMatches.length; i < count; i++) { + userMatchesPattern.push(gScript.userMatches[i].pattern); } + gUserMatchesEl.pages = userMatchesPattern; gScriptExcludesEl.pages = gScript.excludes; gScriptExcludesEl.onAddUserInclude = function(url) {