aboutsummaryrefslogtreecommitdiff
path: root/tools/js_optimizer.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/js_optimizer.py')
-rw-r--r--tools/js_optimizer.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/js_optimizer.py b/tools/js_optimizer.py
index fda5e77d..f8dfddf2 100644
--- a/tools/js_optimizer.py
+++ b/tools/js_optimizer.py
@@ -66,6 +66,8 @@ class Minifier:
# to minify all global names, we receive a dictionary back, which is then
# used by the function processors
+ shell = shell.replace('0.0', '13371337') # avoid uglify doing 0.0 => 0
+
# Find all globals in the JS functions code
self.globs = [m.group(2) for m in func_sig.finditer(self.js)]
@@ -82,7 +84,8 @@ class Minifier:
#print >> sys.stderr, "minified SHELL 3333333333333333", output, "\n44444444444444444444"
code, metadata = output.split('// MINIFY_INFO:')
self.globs = json.loads(metadata)
- return code
+ return code.replace('13371337', '0.0')
+
def serialize(self):
return json.dumps({