diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-07-11 20:46:55 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-07-11 20:46:55 -0700 |
commit | 1aba28b2260192a50f912e579abe587357ef2468 (patch) | |
tree | ae0b00318f997111b6229ea69dfb7bfde53951b4 | |
parent | 7eedeb53cee194625a9a7b15527823ef0f3a9d76 (diff) | |
parent | 98c7b69e8a7d1a8641391dba10d866d2c6196e78 (diff) |
Merge branch 'master' into incoming
-rw-r--r-- | tools/ie7_fix.py | 14 |
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() |