mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-28 04:07:47 +00:00
Merge pull request #5353 from TD-er/bugfix/JS_error_TXbuff_end_chunked
[Cleanup] Fix JS issues + correctly end chunked transfer
This commit is contained in:
@@ -270,7 +270,7 @@ void Web_StreamingBuffer::endStream() {
|
||||
if (!lowMemorySkip) {
|
||||
if (buf.length() > 0) { sendContentBlocking(buf); }
|
||||
buf.clear();
|
||||
// sendContentBlocking(buf);
|
||||
sendContentBlocking(buf);
|
||||
|
||||
web_server.client().PR_9453_FLUSH_TO_CLEAR();
|
||||
|
||||
@@ -293,8 +293,6 @@ void Web_StreamingBuffer::endStream() {
|
||||
addLog(LOG_LEVEL_ERROR, concat("Webpage skipped: low memory: ", finalRam));
|
||||
lowMemorySkip = false;
|
||||
}
|
||||
const char *footer_empty = "0\r\n\r\n";
|
||||
web_server.client().write(footer_empty, 5);
|
||||
|
||||
delay(5);
|
||||
web_server.client().stop();
|
||||
|
||||
@@ -103,7 +103,7 @@ static const char DATA_GITHUB_CLIPBOARD_JS[] PROGMEM = {
|
||||
"{var o='copyText_'+n,t=document.getElementById(o);if(t){var a='|';n%2==0&&(a+='\\n'),e+=t.innerHTML.replace(/<[Bb][Rr]\\s*\\/?>/gim,'\\n')+a}else n=101}"
|
||||
"e=(e=e.replace(/<\\/[Dd][Ii][Vv]\\s*\\/?>/gim,'\\n')).replace(/<[^>]*>/gim,'');"
|
||||
"var i=document.createElement('textarea');i.style='position: absolute;left: -1000px; top: -1000px',i.innerHTML=e,document.body.appendChild(i),i.select(),document.execCommand('copy'),"
|
||||
"document.body.removeChild(i),alert('Copied: ''+e+'' to clipboard!')}"
|
||||
"document.body.removeChild(i),alert('Copied: '+e+' to clipboard!');}"
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -356,7 +356,7 @@ static const char jsClipboardCopyPart3[] PROGMEM = {
|
||||
"ti.select();"
|
||||
"document.execCommand('copy');"
|
||||
"document.body.removeChild(ti);"
|
||||
"alert('Copied: \"' + cb + '\" to clipboard!') }"
|
||||
"alert('Copied: \"' + cb + '\" to clipboard!'); }"
|
||||
"</script>"
|
||||
};
|
||||
|
||||
|
||||
@@ -23,5 +23,5 @@ function setGithubClipboard() {
|
||||
tempInput.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(tempInput);
|
||||
alert('Copied: "' + clipboard + '" to clipboard!')
|
||||
alert('Copied: "' + clipboard + '" to clipboard!');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user