From 10304c9d57d5ed58cb1b763aa18d396bc29e0275 Mon Sep 17 00:00:00 2001 From: Einar Lielmanis Date: Thu, 12 May 2011 02:34:56 +0300 Subject: [PATCH] Slightly improve variable naming --- index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 4e126d8f..720fcf01 100644 --- a/index.html +++ b/index.html @@ -237,14 +237,14 @@ function unpacker_filter(source, strip_comments) found = false; if (/^\s*\/\*/.test(source)) { found = true; - commentChunk = source.substr(0, source.indexOf('*/') + 2); - source = source.substr(commentChunk.length).replace(/^\s+/, ''); - comment += commentChunk + "\n"; + comment = source.substr(0, source.indexOf('*/') + 2); + source = source.substr(comment.length).replace(/^\s+/, ''); + trailing_comments += comment + "\n"; } else if (/^\s*\/\//.test(source)) { found = true; - commentChunk = source.match(/^\s*\/\/.*/)[0]; - source = source.substr(commentChunk.length).replace(/^\s+/, ''); - comment += commentChunk + "\n"; + comment = source.match(/^\s*\/\/.*/)[0]; + source = source.substr(comment.length).replace(/^\s+/, ''); + trailing_comments += comment + "\n"; } } while (found); @@ -261,7 +261,7 @@ function unpacker_filter(source, strip_comments) source = unpacker_filter(MyObfuscate.unpack(source)) } - return comment + source; + return trailing_comments + source; }