MCPcopy Create free account
hub / github.com/Hieromon/AutoConnect / _insertScript

Method _insertScript

src/AutoConnectAux.cpp:646–662  ·  view source on GitHub ↗

* 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

Source from the content-addressed store, hash-verified

644 * @return HTML string that should be inserted.
645 */
646const 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

Callers

nothing calls this directly

Calls 1

canHandleMethod · 0.45

Tested by

no test coverage detected