* Insert the JavaScript required for the dynamic behavior of the elements * contained in the page at the tail of the page. * AutoConnectRange and AutoConnectFile require JavaScript; if an AutoConnectAux * page has these elements, the AutoConnectAux handler will automatically insert * the JavaScript necessary for its operation. * @param args A reference of PageArgument but unused. * @return
| 644 | * @return HTML string that should be inserted. |
| 645 | */ |
| 646 | const String AutoConnectAux::_insertScript(PageArgument& args) { |
| 647 | AC_UNUSED(args); |
| 648 | String postscript; |
| 649 | |
| 650 | // Insert a script that advances the progress bar of uploading progress. |
| 651 | if ((_contains >> (uint16_t)AC_Range) & 0b1) |
| 652 | postscript += String(FPSTR(_PAGE_SCRIPT_MA)); |
| 653 | |
| 654 | // Insert Fetch |
| 655 | for (AutoConnectElement& elm : _addonElm) |
| 656 | if (elm.canHandle()) { |
| 657 | postscript += String(FPSTR(_PAGE_SCRIPT_FE)); |
| 658 | break; |
| 659 | } |
| 660 | |
| 661 | return postscript; |
| 662 | } |
| 663 | |
| 664 | /** |
| 665 | * AutoConnectAux with responsive=false setting will not send HTTP |