From 6643e0e39d4e4e144e53ba5c73a2801f2f25bb51 Mon Sep 17 00:00:00 2001 From: Victor Homyakov Date: Thu, 19 Jul 2012 18:00:48 +0300 Subject: [PATCH] Code optimization in _scriptSource: String#substr instead of String#split, reuse result of #indexOf --- js/VisualEvent.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/js/VisualEvent.js b/js/VisualEvent.js index 46595e0..8f9bbe1 100644 --- a/js/VisualEvent.js +++ b/js/VisualEvent.js @@ -466,7 +466,7 @@ VisualEvent.prototype = { { var origin = ""; var srcFiles = []; - var i, iLen, a; + var i, iLen, script, pos; // Webkit reformats the prototype for the function, so the whitespace might not match our // intended target. Remove the prototype - it means we are more likely to get a clash, but @@ -476,11 +476,12 @@ VisualEvent.prototype = { } for ( i=0, iLen=this.s.scripts.length ; i