aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-07-11 20:46:05 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-07-11 20:46:05 -0700
commit98c7b69e8a7d1a8641391dba10d866d2c6196e78 (patch)
tree180f4c23bae87f2633a659e813954be4fcccef1d
parentfaebd713187b473fa7090c15169618a7af5cbcc8 (diff)
parent813091250ed60da609792fc2c277f4bee01cb52b (diff)
Merge pull request #286 from richardassar/ie7fix_script
Added IE7 fix script
-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()