File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 354
354
document.body.addEventListener('click', function (event) {
355
355
// Do Nothing.
356
356
});
357
+ document.body.addEventListener('submit', function (event) {
358
+ reset_if_recorder_undefined();
359
+ if (sessionStorage.getItem('pause_recorder') === 'yes') return;
360
+ const d_now = Date.now();
361
+ ra_len = document.recorded_actions.length;
362
+ if (ra_len > 0 &&
363
+ document.recorded_actions[ra_len-1][0] === 'input' &&
364
+ !document.recorded_actions[ra_len-1][2].endsWith('\n'))
365
+ {
366
+ selector = document.recorded_actions[ra_len-1][1];
367
+ text = document.recorded_actions[ra_len-1][2] + '\n';
368
+ document.recorded_actions.pop();
369
+ document.recorded_actions.push(['input', selector, text, d_now]);
370
+ json_rec_act = JSON.stringify(document.recorded_actions);
371
+ sessionStorage.setItem('recorded_actions', json_rec_act);
372
+ }
373
+ });
357
374
document.body.addEventListener('formdata', function (event) {
358
375
reset_if_recorder_undefined();
359
376
if (sessionStorage.getItem('pause_recorder') === 'yes') return;
You can’t perform that action at this time.
0 commit comments