diff options
author | The_Fly <richardassar@googlemail.com> | 2012-03-02 00:33:00 +0000 |
---|---|---|
committer | The_Fly <richardassar@googlemail.com> | 2012-03-02 00:33:00 +0000 |
commit | c2a43827ae0eb5c2f1084795acb315c02209524f (patch) | |
tree | aa11b096f8817b7dfd32fb97d8786b920877fb8b /tools/ie7_fix.py | |
parent | 52a42c189ac1add9e2c6912b99b8a5b37e5a2c93 (diff) |
Added IE7 fix script
Diffstat (limited to 'tools/ie7_fix.py')
-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..b7d2a766 --- /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() |