diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-09-07 17:01:11 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-09-07 17:01:11 -0700 |
commit | 676de1e2bed5a11ae70eb92ba58be4e8d2bbf7de (patch) | |
tree | 8f83cc5d15f282e4febc43ea0dcd92cfa66ef931 /tools/reproduceriter.py | |
parent | 05594a58bb70b7628377d7adf7eb3e284000eb6b (diff) |
make reproduceriter work on closured builds
Diffstat (limited to 'tools/reproduceriter.py')
-rwxr-xr-x | tools/reproduceriter.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/reproduceriter.py b/tools/reproduceriter.py index 0f6476b4..3638b882 100755 --- a/tools/reproduceriter.py +++ b/tools/reproduceriter.py @@ -112,8 +112,8 @@ for parent, dirs, files in os.walk(out_dir): fullname = os.path.join(parent, filename) print ' ', fullname js = open(fullname).read() - js = re.sub('document\.on(\w+) = ([\w.]+);', lambda m: 'Recorder.onEvent("' + m.group(1) + '", ' + m.group(2) + ');', js) - js = re.sub('''([\w'"\[\]]+)\.addEventListener\(([\w,. ]+)\);''', lambda m: 'Recorder.addListener(' + m.group(1) + ', ' + m.group(2) + ');', js) + js = re.sub('document\.on(\w+) ?= ?([\w.$]+)', lambda m: 'Recorder.onEvent("' + m.group(1) + '", ' + m.group(2) + ')', js) + js = re.sub('''([\w.'"\[\]]+)\.addEventListener\(([\w,. $]+)\)''', lambda m: 'Recorder.addListener(' + m.group(1) + ', ' + m.group(2) + ')', js) open(fullname, 'w').write(js) # Add our boilerplate |