aboutsummaryrefslogtreecommitdiff
path: root/tools/ie7_fix.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ie7_fix.py')
-rw-r--r--tools/ie7_fix.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/ie7_fix.py b/tools/ie7_fix.py
new file mode 100644
index 00000000..3cdabb07
--- /dev/null
+++ b/tools/ie7_fix.py
@@ -0,0 +1,14 @@
+'''
+Simple tool to replace string lastchar from array access [] to charAt, for the purpose of IE7 support
+'''
+import os, sys, re
+
+inputFilename = sys.argv[1];
+outputFilename = sys.argv[2];
+
+inputFiledata = open(inputFilename).read()
+outputFile = open(outputFilename, "w")
+
+outputFile.write(re.sub('type\[type.length - 1\] ===? "\*"', 'type.charAt(type.length - 1) == "*"', inputFiledata))
+
+outputFile.close()