mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-29 23:47:10 +00:00
fhemweb.js: truncate "Copy to forum" to 60k (Forum #129858)
git-svn-id: https://svn.fhem.de/fhem/trunk@26799 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c2a188a33c
commit
cc1facb0dc
@ -1002,6 +1002,10 @@ FW_detLink()
|
|||||||
} else if(cmd == "forumCopy") {
|
} else if(cmd == "forumCopy") {
|
||||||
FW_cmd(FW_root+"?cmd=list -r -i "+dev+"&XHR=1", function(data) {
|
FW_cmd(FW_root+"?cmd=list -r -i "+dev+"&XHR=1", function(data) {
|
||||||
var ta = document.createElement("textarea");
|
var ta = document.createElement("textarea");
|
||||||
|
if(data.length > 60*1000) {
|
||||||
|
data = data.substr(0,60*1000)+
|
||||||
|
"\n# ... truncated to 60k, original length "+data.length;
|
||||||
|
}
|
||||||
ta.value = '[code]'+data+'[/code]';
|
ta.value = '[code]'+data+'[/code]';
|
||||||
document.body.appendChild(ta);
|
document.body.appendChild(ta);
|
||||||
ta.select();
|
ta.select();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user