|
361 | 361 | document.title = sessionStorage.getItem('recorder_title');
|
362 | 362 | });
|
363 | 363 | document.body.addEventListener('click', function (event) {
|
364 |
| - // Do Nothing. |
| 364 | + // Do Nothing |
365 | 365 | });
|
366 | 366 | document.body.addEventListener('submit', function (event) {
|
367 | 367 | reset_if_recorder_undefined();
|
|
513 | 513 | if (rec_mode === '2' || rec_mode === '3')
|
514 | 514 | {
|
515 | 515 | el = turnIntoParentAsNeeded(el);
|
516 |
| - texts = [el.innerText, el.textContent]; |
517 |
| - text = texts[0]; |
518 |
| - t_con = texts[1]; |
| 516 | + text = el.innerText; |
| 517 | + t_con = el.textContent; |
519 | 518 | origin = window.location.origin;
|
520 | 519 | sel_has_contains = selector.includes(':contains(');
|
521 | 520 | if (!text) { text = ''; }
|
|
530 | 529 | else if (rec_mode === '3') {
|
531 | 530 | action = 'as_et';
|
532 | 531 | text = text.trim();
|
| 532 | + if (el.tagName.toLowerCase() == "input") |
| 533 | + text = el.value.trim(); |
533 | 534 | var match = /\r|\n/.exec(text);
|
534 | 535 | if (match) {
|
535 | 536 | lines = text.split(/\r\n|\r|\n/g);
|
|
550 | 551 | if (ra_len > 0 && document.recorded_actions[ra_len-1][0] === 'mo_dn')
|
551 | 552 | document.recorded_actions.pop();
|
552 | 553 | if (tag_name === 'select') {
|
553 |
| - // Do Nothing. ('change' action.) |
| 554 | + // Do Nothing ('change' action) |
554 | 555 | }
|
555 | 556 | else
|
556 | 557 | document.recorded_actions.push(['mo_dn', selector, '', d_now]);
|
|
662 | 663 | else if (ra_len > 0 &&
|
663 | 664 | document.recorded_actions[ra_len-1][0] === 'mo_dn')
|
664 | 665 | {
|
665 |
| - // Maybe accidental drag & drop. |
| 666 | + // Accidental drag & drop. |
666 | 667 | document.recorded_actions.pop();
|
667 | 668 | }
|
668 | 669 | json_rec_act = JSON.stringify(document.recorded_actions);
|
|
733 | 734 | red_border = 'thick solid #EE3344';
|
734 | 735 | document.querySelector('body').style.border = red_border;
|
735 | 736 | }
|
736 |
| - // After controls for switching modes. |
| 737 | + // After switching modes |
737 | 738 | if (sessionStorage.getItem('pause_recorder') === 'yes') return;
|
738 | 739 | const d_now = Date.now();
|
739 | 740 | const el = event.target;
|
|
775 | 776 | {
|
776 | 777 | skip_input = true;
|
777 | 778 | }
|
778 |
| - if (!skip_input) { |
| 779 | + if (!skip_input && !el.hasAttribute('readonly')) { |
779 | 780 | document.recorded_actions.push(
|
780 | 781 | ['input', selector, el.value, d_now]);
|
781 | 782 | }
|
|
0 commit comments